]> mj.ucw.cz Git - libucw.git/commitdiff
Tests for the string module.
authorMartin Mares <mj@ucw.cz>
Tue, 1 Jul 2008 09:06:03 +0000 (11:06 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 1 Jul 2008 09:06:03 +0000 (11:06 +0200)
lib/string.t [new file with mode: 0644]

diff --git a/lib/string.t b/lib/string.t
new file mode 100644 (file)
index 0000000..5224b9c
--- /dev/null
@@ -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