From 99792bb65fca43df81844dde3acc191c56ce47e3 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Wed, 26 Jan 2011 10:48:58 +1000 Subject: scan fails with strings containing nulls Signed-off-by: Steve Bennett --- tests/scan.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/scan.test b/tests/scan.test index 0614d56..f936ee3 100644 --- a/tests/scan.test +++ b/tests/scan.test @@ -658,4 +658,16 @@ test scan-13.8 {Tcl_ScanObjCmd, inline XPG case lots of arguments} { list [llength $msg] [lindex $msg 99] [lindex $msg 4] [lindex $msg 199] } {200 10 20 30} +test scan-14.1 {scan with null chars} { + scan a\0c %c%c%c +} {97 0 99} + +test scan-14.2 {scan with null chars} { + scan \0\0c %c%c%c +} {0 0 99} + +test scan-14.3 {scan with null chars} { + scan ab12x\0 %cb%dx%c +} {97 12 0} + testreport -- cgit v1.1