summaryrefslogtreecommitdiffstats
path: root/test.sh
diff options
context:
space:
mode:
authorChris West (Faux) <git@goeswhere.com>2015-10-01 20:31:42 +0100
committerChris West (Faux) <git@goeswhere.com>2015-10-01 20:31:42 +0100
commitf741591d203f59faf6e041cbc6b6974ad2246144 (patch)
tree837fab3395d7b7d5bbbd4e7040a344ac7e8faddd /test.sh
downloadghetto-json-f741591d203f59faf6e041cbc6b6974ad2246144.tar.gz
ghetto-json-f741591d203f59faf6e041cbc6b6974ad2246144.tar.bz2
ghetto-json-f741591d203f59faf6e041cbc6b6974ad2246144.tar.xz
ghetto-json-f741591d203f59faf6e041cbc6b6974ad2246144.zip
initial commit
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..76e4e12
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -eu
+T=$(mktemp)
+trap "rm $T" EXIT
+echo '{ "a": 5, "b": {"c": 6, "d": "hello" } }' > $T
+python ghetto_json path=$T a=7 b.c=yellow b.d=unset
+diff -u <(printf '{\n "a": 7,\n "b": {\n "c": "yellow"\n }\n}') $T
+