diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-04-05 08:41:48 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-04-05 08:41:48 (GMT) |
commit | 224849c744f0f6ceb853162afd318b858835850c (patch) | |
tree | 679b353959d9797b0c59459c42491f6326c65a9d /tests/scan.test | |
parent | fa5016d63742a4a0c36eaa0dd9f17fd818123cf5 (diff) | |
download | tcl-224849c744f0f6ceb853162afd318b858835850c.zip tcl-224849c744f0f6ceb853162afd318b858835850c.tar.gz tcl-224849c744f0f6ceb853162afd318b858835850c.tar.bz2 |
Fix [4b12ccb3363e81b132e8dbe12aeec596102be1a8|4b12ccb336]: format/scan %llu doesn't work. Also added new test-cases showing the expected behavior.
Diffstat (limited to 'tests/scan.test')
-rw-r--r-- | tests/scan.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/scan.test b/tests/scan.test index 7540c9c..8ddb595 100644 --- a/tests/scan.test +++ b/tests/scan.test @@ -541,6 +541,19 @@ 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 {}; set d {} +} -body { + list [scan "207698809136909011942886895,207698809136909011942886895,abcdef0123456789abcdef,125715736004432126361152746757" \ + %llu,%lld,%llx,%llo a b c d] $a $b $c $d +} -result {4 207698809136909011942886895 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-6.1 {floating-point scanning} -setup { set a {}; set b {}; set c {}; set d {} |