From a03269a0b04546afe5b0e8b8a08520902a0f5ed9 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 1 Jul 2008 11:06:03 +0200 Subject: [PATCH] Tests for the string module. --- lib/string.t | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/string.t 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 -- 2.39.5