summaryrefslogtreecommitdiff
path: root/test/proto
diff options
context:
space:
mode:
Diffstat (limited to 'test/proto')
-rw-r--r--test/proto/TARGETS7
-rw-r--r--test/proto/test.sh12
2 files changed, 19 insertions, 0 deletions
diff --git a/test/proto/TARGETS b/test/proto/TARGETS
new file mode 100644
index 0000000..50d5195
--- /dev/null
+++ b/test/proto/TARGETS
@@ -0,0 +1,7 @@
+{ "":
+ { "type": ["@", "rules", "shell/test", "script"]
+ , "name": ["proto"]
+ , "test": ["test.sh"]
+ , "deps": [["@", "src", "proto", "write"], ["@", "src", "proto", "read"]]
+ }
+}
diff --git a/test/proto/test.sh b/test/proto/test.sh
new file mode 100644
index 0000000..fbd946b
--- /dev/null
+++ b/test/proto/test.sh
@@ -0,0 +1,12 @@
+set -e
+
+./write FOO 42 data.bin 2>&1
+
+echo
+echo Binary encoding
+xxd data.bin
+
+echo
+echo Verifying read
+./read data.bin | grep foo=FOO
+./read data.bin | grep bar=42