From f1f39a77b47822d7f9a942f63a06a606c3a65292 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 26 Nov 2019 13:54:17 +0100 Subject: [PATCH 1/2] Add test cases for whitespace This test will catch implementation bugs related to whitespace. https://github.com/jmespath/jmespath.js/issues/58 --- tests/basic.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/basic.json b/tests/basic.json index d550e96..1150274 100644 --- a/tests/basic.json +++ b/tests/basic.json @@ -18,6 +18,22 @@ "expression": "foo\n.\nbar\n.baz", "result": "correct" }, + { + "expression": "foo . bar . baz", + "result": "correct" + }, + { + "expression": "foo\t.\tbar\t.\tbaz", + "result": "correct" + }, + { + "expression": "foo\r.\rbar\r.\rbaz", + "result": "correct" + }, + { + "expression": "foo\r\n.\r\nbar\r\n.\r\nbaz", + "result": "correct" + }, { "expression": "foo.bar.baz.bad", "result": null From c7bf0503cc226ddc591438b33faf0e898f41951f Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 30 Dec 2019 18:14:37 +0100 Subject: [PATCH 2/2] Removed trailing whitespace --- tests/basic.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/basic.json b/tests/basic.json index 1150274..f06e9ae 100644 --- a/tests/basic.json +++ b/tests/basic.json @@ -25,15 +25,15 @@ { "expression": "foo\t.\tbar\t.\tbaz", "result": "correct" - }, + }, { "expression": "foo\r.\rbar\r.\rbaz", "result": "correct" - }, + }, { "expression": "foo\r\n.\r\nbar\r\n.\r\nbaz", "result": "correct" - }, + }, { "expression": "foo.bar.baz.bad", "result": null