Preserve false in single-expression queries (#145)

Note: 1 = 2 is different from 1 == 2
See issue for details

fixes #144

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2024-02-16 06:11:07 -08:00
committed by GitHub
parent 7d32bd9377
commit 8d282f1ffd
5 changed files with 90 additions and 13 deletions

View File

@@ -233,7 +233,7 @@ impl Engine {
/// // Load input and make query.
/// engine.set_input(Value::new_object());
/// let results = engine.eval_query("data.framework.mount_overlay.allowed".to_string(), false)?;
/// assert!(results.result.is_empty());
/// assert_eq!(results.result[0].expressions[0].value, Value::from(false));
///
/// // Evaluate query with different inputs.
/// engine.set_input(Value::from_json_file("tests/aci/input.json")?);