diff --git a/biscuit-auth/examples/testcases.rs b/biscuit-auth/examples/testcases.rs index 24d6ec3d..fd8d6f8c 100644 --- a/biscuit-auth/examples/testcases.rs +++ b/biscuit-auth/examples/testcases.rs @@ -1991,11 +1991,13 @@ fn expressions_v4(target: &str, root: &KeyPair, test: bool) -> TestResult { let biscuit = biscuit!( r#" + //bool not strict equal + check if true !== false; //integer not strict equal check if 1 !== 3; //integer bitwise and or xor check if 1 | 2 ^ 3 === 0; - // string not strict equal + //string not strict equal check if "abcD12x" !== "abcD12"; //date not strict equal check if 2022-12-04T09:46:41+00:00 !== 2020-12-04T09:46:41+00:00; diff --git a/biscuit-auth/samples/README.md b/biscuit-auth/samples/README.md index a0907504..16715eac 100644 --- a/biscuit-auth/samples/README.md +++ b/biscuit-auth/samples/README.md @@ -2460,6 +2460,7 @@ public keys: [] block version: 4 ``` +check if true !== false; check if 1 !== 3; check if 1 | 2 ^ 3 === 0; check if "abcD12x" !== "abcD12"; @@ -2476,7 +2477,7 @@ allow if true; ``` revocation ids: -- `117fa653744c859561555e6a6f5990e3a8e7817f91b87aa6991b6d64297158b4e884c92d10f49f74c96069df722aa676839b72751ca9d1fe83a7025b591de00b` +- `9402c07923aa33bc911de80e61f388f5c4533e6b36e45317dc1db1e6bcc7664ed0c1c504d0ca8925208008961d95bbdbc36f6e3d91b3173369cc19ed625e9a0c` authorizer world: ``` @@ -2494,6 +2495,7 @@ World { "check if 1 | 2 ^ 3 === 0", "check if 2022-12-04T09:46:41Z !== 2020-12-04T09:46:41Z", "check if hex:12abcd !== hex:12ab", + "check if true !== false", "check if {1, 4} !== {1, 2}", ], }, diff --git a/biscuit-auth/samples/samples.json b/biscuit-auth/samples/samples.json index 62db50bf..3366eaf4 100644 --- a/biscuit-auth/samples/samples.json +++ b/biscuit-auth/samples/samples.json @@ -2251,7 +2251,7 @@ ], "public_keys": [], "external_key": null, - "code": "check if 1 !== 3;\ncheck if 1 | 2 ^ 3 === 0;\ncheck if \"abcD12x\" !== \"abcD12\";\ncheck if 2022-12-04T09:46:41Z !== 2020-12-04T09:46:41Z;\ncheck if hex:12abcd !== hex:12ab;\ncheck if {1, 4} !== {1, 2};\n", + "code": "check if true !== false;\ncheck if 1 !== 3;\ncheck if 1 | 2 ^ 3 === 0;\ncheck if \"abcD12x\" !== \"abcD12\";\ncheck if 2022-12-04T09:46:41Z !== 2020-12-04T09:46:41Z;\ncheck if hex:12abcd !== hex:12ab;\ncheck if {1, 4} !== {1, 2};\n", "version": 4 } ], @@ -2269,6 +2269,7 @@ "check if 1 | 2 ^ 3 === 0", "check if 2022-12-04T09:46:41Z !== 2020-12-04T09:46:41Z", "check if hex:12abcd !== hex:12ab", + "check if true !== false", "check if {1, 4} !== {1, 2}" ] } @@ -2282,7 +2283,7 @@ }, "authorizer_code": "allow if true;\n", "revocation_ids": [ - "117fa653744c859561555e6a6f5990e3a8e7817f91b87aa6991b6d64297158b4e884c92d10f49f74c96069df722aa676839b72751ca9d1fe83a7025b591de00b" + "9402c07923aa33bc911de80e61f388f5c4533e6b36e45317dc1db1e6bcc7664ed0c1c504d0ca8925208008961d95bbdbc36f6e3d91b3173369cc19ed625e9a0c" ] } } diff --git a/biscuit-auth/samples/test028_expressions_v4.bc b/biscuit-auth/samples/test028_expressions_v4.bc index c34d7a10..7d94e82d 100644 Binary files a/biscuit-auth/samples/test028_expressions_v4.bc and b/biscuit-auth/samples/test028_expressions_v4.bc differ