aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2011-07-18Don't add a local proc context in source and evalSteve Bennett1-10/+2
Only procedures add a local proc context. Otherwise it is not possible to use local/upcall in Tcl packages. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-13Setup auto_path directly in tests/testing.tclSteve Bennett2-1/+3
Rather than relying on setting JIMLIB in the Makefile. Makes it easier to run individual tests manually. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-12Fix some [file join] casesSteve Bennett1-0/+18
In particular, file join / anything Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-08Fix missing expr error message with || and &&Steve Bennett1-0/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-08Make list to string conversion more Tcl compatibleSteve Bennett1-2/+2
If a list elements contains unmatch ] brackets, use backslash quoting instead of braces. This is what Tcl does. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-08Better proc optional arg handlingSteve Bennett1-0/+15
Allows args and optional parameters in any location, in addition to being smaller and faster. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-07Make an array test more reliableSteve Bennett1-1/+1
Currently it depends on hash table ordering. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-29Mark tests which require utf-8 supportSteve Bennett2-4/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Add some missing test dependenciesSteve Bennett2-1/+3
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Clear out vars before testSteve Bennett1-0/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Slightly more efficient proc testSteve Bennett1-3/+3
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Implement the [binary] commandSteve Bennett2-0/+1744
Supports everything except floating point types binary is implemented in Tcl on top of the low level [pack] and [unpack] commands Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-10Add TclX-compatible loop commandSteve Bennett1-0/+152
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-09Revert regexp nested repeats from b34ab2f895Steve Bennett1-1/+2
Nested repeats can't really be handled properly, so remove support since it breaks some non-nested cases. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-07Simplify/fix repeating matchesSteve Bennett1-25/+91
Simplifies *, + and {n,m}, fixes some broken cases and adds support for {n,m}? Also fixes end-of-word match Under some circumstances, repeats can now be nested. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-05Fix simple * and + case for utf-8Steve Bennett1-0/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-04Make test error easier to readSteve Bennett1-0/+1
Add a blank line after each error Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-04Fix utf8 char matching in character rangesSteve Bennett1-0/+8
Also searching the initial part of the string Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-03Fix parsing bug introduced by 505ce9d7Steve Bennett1-7/+12
This caused a problem with quotes inside commands. Rework the parsing to properly handle commands inside quoted strings and quoted strings inside commands. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-03lsort test should produce reliable resultsSteve Bennett1-1/+5
Previously different systems could produce different, valid results Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-03Add non-greedy regexp supportSteve Bennett1-0/+39
Support +?, *? and ?? Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-01Add [upcall] commandSteve Bennett1-0/+43
Allows previous command definitions to be invoked when otherwise hidden via [local] Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-01local procs now keep and restore previous defnSteve Bennett1-0/+36
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-31Fix a dict sugar parse bug with backslashed charsSteve Bennett1-0/+50
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-31Support $(...) expr shorthand syntaxSteve Bennett1-0/+52
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-31Fix a minor parsing bug - quoted backslash newlineSteve Bennett1-1/+26
Should eat spaces and tabs after the newline Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-24Small code cleanupsSteve Bennett8-4/+162
Remove Jim_SetWide() since it is only used by incr More tests for better test coverage Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-23Improve list parsingSteve Bennett5-7/+221
Also add additional tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-23Fix some minor parsing bugsSteve Bennett1-0/+103
And add additional tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-20Minor cleanups to dict sugar parsingSteve Bennett1-0/+13
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-16Fix a parsing bug with quoted strings inside [...]Steve Bennett1-0/+24
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-09Automatic proc upref with & syntaxSteve Bennett1-0/+56
e.g. proc a {&b &c} ... Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-09Allow proc 'args' to be renamedSteve Bennett1-0/+21
With this syntax: {args newname}. This especially helps with documentation and error messages. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-23Clean out the tcltests directorySteve Bennett1-0/+97
Some tests are already in tests/, move some others. Move some examples to the examples directory Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-22Fix tcltest v2 for the -setup optionSteve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-21string trim is now 8 bit cleanSteve Bennett1-0/+15
i.e. supports embedded nulls Also now supports utf-8 trim chars Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-21Add some tcltest v2 supportSteve Bennett1-6/+44
Makes it easier to import Tcl tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-05Better support for eventloop on mingw32Steve Bennett1-1/+3
Which doesn't support select() with no fds. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-01-26scan fails with strings containing nulls0.70Steve Bennett1-0/+12
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-01-24Jim 'string is' doesn't work with unicodeSteve Bennett1-1/+1
So just disable this test Reported-by: Paulo Ferreira <paf@keeh.net> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-21More constraint improvementsSteve Bennett4-10/+14
2010-12-16Implement 'tree' in terms of 'oo'Steve Bennett1-6/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-15Fix an object sharing bug for arraysSteve Bennett1-0/+28
Commands which modify variables in place such as append, lappend, incr and lset did not correctly account for modifying a shared array through an array element (dict sugar). Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-15Fix for right-to-left associativity of ternary operatorSteve Bennett1-3/+3
Signed-off-by: Patrick WEBER <patrick.weber@live.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-14Platform differences for regexp messagesSteve Bennett1-4/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-14Fix constraint checkingSteve Bennett3-6/+10
This was completely wrong. The arg order was wrong such that when test constraints were specifed the test was always skipped! Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-14Include all double colons as part of the var nameSteve Bennett1-0/+7
e.g. $::a::b is considered as ${::a::b} This helps be more Tcl compatible by allowing fake namespace variables Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-06Add more dependencies for testsSteve Bennett13-9/+32
Allow tests to run with almost all features disabled
2010-12-02Add the [exists] commandSteve Bennett1-0/+78
Especially simplifies checking for the existence of procs. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-28Bug fix: regexp should not treat \n as |Steve Bennett1-0/+4
Remove a "feature" in the built-in regexp, where a newline in the pattern was treated as alternation, like |. Signed-off-by: Steve Bennett <steveb@workware.net.au>