From: Martin Mares Date: Tue, 1 Jul 2008 09:06:03 +0000 (+0200) Subject: Tests for the string module. X-Git-Tag: holmes-import~413 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=a03269a0b04546afe5b0e8b8a08520902a0f5ed9;p=libucw.git Tests for the string module. --- diff --git a/lib/string.t b/lib/string.t new file mode 100644 index 00000000..5224b9cf --- /dev/null +++ b/lib/string.t @@ -0,0 +1,15 @@ +# Tests of string routines + +Run: ../obj/lib/str-hex-t +Out: FEEDF00D + fe:ed:f0:0d + feedf00d + +Run: ../obj/lib/str-esc-t '12\r\n\000\\\xff' +Out: 31 32 0d 0a 00 5c ff + +Run: ../obj/lib/str-esc-t '\100\10a\1a' +Out: 40 08 61 01 61 + +Run: ../obj/lib/str-esc-t '\a\b\f\r\n\t\v\?\"'"\\'" +Out: 07 08 0c 0d 0a 09 0b 3f 22 27