summaryrefslogtreecommitdiffstats
path: root/testdata
diff options
context:
space:
mode:
authorDamian Gryski <damian@gryski.com>2012-10-23 21:12:47 +0200
committerDamian Gryski <damian@gryski.com>2012-10-23 21:12:47 +0200
commit45b6fc81481677e3b3b716871f4f9fe3d311590e (patch)
tree0aad36326ef3df29aafbec9f52e7f9e6d2ba2d18 /testdata
parent409456f581f192253b4f07effdd6acb304b790fd (diff)
Add some in/equality test cases
Diffstat (limited to 'testdata')
-rw-r--r--testdata24
1 files changed, 23 insertions, 1 deletions
diff --git a/testdata b/testdata
index 6f04a1d5..8cd5e27c 100644
--- a/testdata
+++ b/testdata
@@ -372,4 +372,26 @@ def inc(x): x |= .+1; inc(.[].a)
[10 >= 0, 10 >= 10, 10 >= 20, 10 <= 0, 10 <= 10, 10 <= 20]
{}
-[true,true,false,false,true,true] \ No newline at end of file
+[true,true,false,false,true,true]
+
+# And some in/equality tests
+[ 10 == 10, 10 != 10, 10 != 11, 10 == 11]
+{}
+[true,false,true,false]
+
+["hello" == "hello", "hello" != "hello", "hello" == "world", "hello" != "world" ]
+{}
+[true,false,false,true]
+
+[[1,2,3] == [1,2,3], [1,2,3] != [1,2,3], [1,2,3] == [4,5,6], [1,2,3] != [4,5,6]]
+{}
+[true,false,false,true]
+
+[{"foo":42} == {"foo":42},{"foo":42} != {"foo":42}, {"foo":42} != {"bar":42}, {"foo":42} == {"bar":42}]
+{}
+[true,false,true,false]
+
+# ugly complicated thing
+[{"foo":[1,2,{"bar":18},"world"]} == {"foo":[1,2,{"bar":18},"world"]},{"foo":[1,2,{"bar":18},"world"]} == {"foo":[1,2,{"bar":19},"world"]}]
+{}
+[true,false]