Update string literal escape test
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 18 Apr 2013 14:21:15 +0000 (10:21 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 18 Apr 2013 14:21:15 +0000 (10:21 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/pass/list
tests/pass/string-literal-escape/dummystream [new file with mode: 0644]
tests/pass/string-literal-escape/metadata [new file with mode: 0644]
tests/pass/succeed3/dummystream [deleted file]
tests/pass/succeed3/metadata [deleted file]

index c260f3e9050ad418cd19ba1b1e908ff9bf13f341..ef5388db803da62d7a5ad9f310e654bc1648bb2a 100644 (file)
@@ -3,9 +3,9 @@
 ./test.sh smalltrace/
 ./test.sh succeed1/
 ./test.sh succeed2/
-./test.sh succeed3/
 ./test.sh succeed4/
 ./test.sh string-concat/
+./test.sh string-literal-escape/
 ./test.sh test/
 ./test.sh warnings/
 ./test.sh wk-heartbeat-u/
diff --git a/tests/pass/string-literal-escape/dummystream b/tests/pass/string-literal-escape/dummystream
new file mode 100644 (file)
index 0000000..53d735e
Binary files /dev/null and b/tests/pass/string-literal-escape/dummystream differ
diff --git a/tests/pass/string-literal-escape/metadata b/tests/pass/string-literal-escape/metadata
new file mode 100644 (file)
index 0000000..71d6c18
--- /dev/null
@@ -0,0 +1,41 @@
+/* CTF 1.8 */
+typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
+typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
+
+trace {
+       major = 0;
+       minor = 1;
+       test2 = "?\x20\040\123\0?";
+       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
+       byte_order = le;
+       packet.header := struct {
+               uint32_t magic;
+               uint8_t  uuid[16];
+       };
+};
+
+/* use babeltrace -f trace:hostname to print. */
+
+/*
+ * Expected:
+
+abc " hex: A, #, #, #1,
+oct: A, #, #, #1,
+
+ */
+
+env {
+       hostname = "\nabc \" hex: \x41, \x23, \x023, \x0231,\noct: \101, \043, \43, \0431, \0NOT SEEN";
+};
+
+stream {
+       packet.context := struct {
+               uint32_t content_size;
+               uint32_t packet_size;
+       };
+};
+
+event {
+       name = string;
+       fields := struct { string str; };
+};
diff --git a/tests/pass/succeed3/dummystream b/tests/pass/succeed3/dummystream
deleted file mode 100644 (file)
index 53d735e..0000000
Binary files a/tests/pass/succeed3/dummystream and /dev/null differ
diff --git a/tests/pass/succeed3/metadata b/tests/pass/succeed3/metadata
deleted file mode 100644 (file)
index c180766..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* CTF 1.8 */
-typealias integer { size = 8; align = 8; signed = false; base = 10; } := uint8_t;
-typealias integer { size = 32; align = 32; signed = false; base = hex; } := uint32_t;
-
-trace {
-       major = 0;
-       minor = 1;
-       test = "\"";
-       test2 = "?\x20\o040?";
-       test3 = '\n';
-       uuid = "2a6422d0-6cee-11e0-8c08-cb07d7b3a564";
-       byte_order = le;
-       packet.header := struct {
-               uint32_t magic;
-               uint8_t  uuid[16];
-       };
-};
-
-stream {
-       packet.context := struct {
-               uint32_t content_size;
-               uint32_t packet_size;
-       };
-};
-
-event {
-       name = string;
-       fields := struct { string str; };
-};
This page took 0.025453 seconds and 4 git commands to generate.