aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2014-09-01aio: optional argument addrvar for accept.Danyil Bohdan1-1/+34
2014-07-26jim.c: make lindex work as identity function.Danyil Bohdan1-3/+7
2014-04-28event.test: Fix test on HaikuSteve Bennett1-2/+2
Haiku doesn't seem to trigger the "readable" event on a connected socket with no data, so use the "writable" event instead since this seems to work on all platforms. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-03-18jim.c: check for missing quotes, etc. in eval, exprSteve Bennett1-2/+2
Throw an error if a script or expression is missing a trailing bracket, brace or quote rather than simply ignoring the error. Reported-by: Florian Schäfer <florian.schaefer+github@gmail.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-18jim.c: fix some dict/list shimmering issuesSteve Bennett1-0/+11
Only do fast dict->list conversion if there is no string rep When converting list->dict, generate the string rep of a shared list to avoid loss of info when converting to dict. Also add a relevent test to dict.test Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-15jim.c: simplify JimDictExpandArrayVariable()Steve Bennett1-9/+9
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-15array: array set to non-dict should failSteve Bennett1-0/+4
Currently returns the error message but does not set JIM_ERR Also add a test case Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-15namespace: disallow array element syntax for variablesSteve Bennett1-0/+6
Detect and generate an appropriate message if the variable name is an array element (dict sugar syntax) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-15tests: Don't stop on the first errorSteve Bennett1-1/+1
But still return non-zero if there are any errors On some systems there are known test failures Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-15tclcompat: it is finally time to remove [case]Steve Bennett1-86/+0
Use [switch] instead Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-15tests: fix tests if tclcompat is not enabledSteve Bennett4-5/+27
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-15pid: error message is now tcl 8.6 compatibleSteve Bennett1-2/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-03tailcall: properly merge tailcall framesSteve Bennett1-1/+43
Resolve the tailcall command immediately in [tailcall] and stash it. If a tailcall is currently being evaluated, new tailcalls in the same frame are merged/deferred to evaluate in the same C stack frame. Can't merge tailcall evaluations across uplevel. Add some tests for these cases Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-12-21Implement more dict sub commandsSteve Bennett1-0/+1249
dict for, values, incr, append, lappend, update, replace and info Also implement array stat (the same as dict info) Note that [dict info] and [array stat] are for useful for checking the behaviour of the hash randomiser Add Jim_EvalEnsemble() Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-12-21Fix the lsort -unique testSteve Bennett1-2/+4
2013-12-21Fix hash table order dependency in various testsSteve Bennett5-11/+24
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-12-21tailcall should resolve command in current namespaceSteve Bennett1-0/+12
Currently tailcall resolves the command in the parent namespace. This also fixes the deletion of [local] commands such that they are always correctly deleted. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-12-11Add support for lsort -uniqueSteve Bennett1-1/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-12-11Add support for lsort -realSteve Bennett1-1/+10
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-12-09Fix aio close from non-global namespaceSteve Bennett1-0/+11
aio [open], as well as similar commands return the name of the created command. If this is done in the non-global namespace, the returned name is implicitly scoped to the current namespace while the actual command is created in the global namespace. Thus [close] does not work when invoked in that namespace. The solution is to return a fully qualified name, such as ::aio.handle3 Note that this may also be a problem for similar command such as [proc] and [alias] that return command names. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-11-28Add basic support for [format %b]Steve Bennett1-0/+16
Binary conversion Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-11-28Fix dict/list shimmering with embedded nullsSteve Bennett1-0/+8
Reported-by: Andy <jimdevel@hummypkg.org.uk> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-11-11Properly respect backslashes in commentsSteve Bennett1-0/+15
Reported-by: Sergei Gavrikov <sergei.gavrikov@gmail.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-11-07file copy -force handles identical source/targetSteve Bennett1-0/+5
No longer truncates the file Reported-by: sg0x40 <https://github.com/sg0x40> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-09-19Build on platforms without isasciiSteve Bennett1-0/+6
Signed-off-by: Steve Bennett <steveb@workware.net.au> Reported-by: Paul Fertser <fercerpav@gmail.com>
2013-08-28Re-add missing tests from 45e938f7Steve Bennett1-0/+15
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-08-19Add floating point support for [binary]Steve Bennett3-1759/+2467
From work by Vadim Zborovskii Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-08-19Support nulls in [exec] immediate redirectionSteve Bennett1-0/+3
e.g. exec prog <<$data Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-08-02Correct file handler should be deletedSteve Bennett1-1/+1
Previously, Jim_DeleteFileHandler() would indiscriminately delete the first matching file handler in the list. Instead, it should delete the file handler matching the event mask. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-07-22Ensure that signals can break vwaitSteve Bennett2-0/+12
The following should break when a handled signal is caught. catch -signal { vwait forever } Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-02-15Fix [string replace] replacing single charSteve Bennett1-0/+50
Also added some additional tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-09-24Fix binary scan for too-few bytes.Vadim Zborovskii1-0/+15
According to the Tcl manual, in this case "binary scan returns immediately with the number of variables that were set". (Tests added by Steve Bennett) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-09-22Add tests for the glob commandSteve Bennett1-0/+131
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-09-11Add support for string {equal,compare} -lengthSteve Bennett1-15/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-09-06Fix conversion of numbers >= 2^31Steve Bennett1-0/+3
A conversion was being stored in a long rather than a long long Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-08-18Fix a dict/list shimmering bugSteve Bennett1-0/+3
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-08-07Remove octal literals with a leading 0 (TIP #114)Steve Bennett7-15/+54
Now an octal literal needs to be explicitly indicated with a leading 0o or 0O, otherwise the number is treated as decimal. This patch also adds support for binary literals. e.g. 0b101 0B1101 Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-02-17subst -noc should substitute vars inside bracketsSteve Bennett1-0/+6
This also simplifies and shrinks the implementation of subst Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-16Fix double to string on mingwunknown1-46/+46
The MS CRT always produces a 3 digit exponent for %e And update [format] tests to account for this difference
2011-12-16Fix some tests so they run on mingwSteve Bennett3-11/+13
exec and pid tests
2011-12-13More test speedupsSteve Bennett4-135/+66
Speed up the timer and exec unit tests with smaller sleeps Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Strip leading & from proc error messagesSteve Bennett3-9/+9
And some more Tcl8.6 compatible error messages Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Add support for [apply]Steve Bennett2-0/+235
apply has the advantage of not disturbing the proc epoch for short lived commands Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Tcl8.6 compatible error messagesSteve Bennett1-5/+2
These will help with error messages from [apply] Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Make sure exec.test cleans up betterSteve Bennett1-10/+13
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Update some tests for latest Tcl8.6b2Steve Bennett2-8/+6
We strive to be compatible with the latest Tcl8.6 Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Restore the environment after tests/exec2.testSteve Bennett1-0/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Add test of tcl::prefix from a namespaceSteve Bennett1-0/+7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Add support for lightweight namespacesSteve Bennett2-1/+494
See README.namespaces Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-12Remove error message rewriting for aliasesSteve Bennett1-1/+1
It does not extend well enough to the general case, so remove it for simplicity Signed-off-by: Steve Bennett <steveb@workware.net.au>