diff options
author | dgp <dgp@users.sourceforge.net> | 2017-06-22 13:26:31 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-06-22 13:26:31 (GMT) |
commit | a0af7d5841f6a8fbf03f748e9e1a5827a29d6a6a (patch) | |
tree | 0399533a04774cd225f1e61c826c6b04e0981618 /tests/scan.test | |
parent | 9a0f3fc06f63ce3a77d1257877bc079fa5d33d99 (diff) | |
parent | f57dacd4955b9dd474cfd9d4e4d55cac22990f6c (diff) | |
download | tcl-unwanted.zip tcl-unwanted.tar.gz tcl-unwanted.tar.bz2 |
merge trunkunwanted
Diffstat (limited to 'tests/scan.test')
-rw-r--r-- | tests/scan.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/scan.test b/tests/scan.test index 7540c9c..b36b412 100644 --- a/tests/scan.test +++ b/tests/scan.test @@ -541,6 +541,24 @@ test scan-5.15 {Bug be003d570f} { test scan-5.16 {Bug be003d570f} { scan 0x40 %b } 0 +test scan-5.17 {bigint scanning} -setup { + set a {}; set b {}; set c {} +} -body { + list [scan "207698809136909011942886895,abcdef0123456789abcdef,125715736004432126361152746757" \ + %lld,%llx,%llo a b c] $a $b $c +} -result {3 207698809136909011942886895 207698809136909011942886895 207698809136909011942886895} +test scan-5.18 {bigint scanning underflow} -setup { + set a {}; +} -body { + list [scan "-207698809136909011942886895" \ + %llu a] $a +} -returnCodes 1 -result {unsigned bignum scans are invalid} +test scan-5.18 {bigint scanning invalid} -setup { + set a {}; +} -body { + list [scan "207698809136909011942886895" \ + %llu a] $a +} -returnCodes 1 -result {unsigned bignum scans are invalid} test scan-6.1 {floating-point scanning} -setup { set a {}; set b {}; set c {}; set d {} |