From ec8860d0be80b02052a5113588469158291fdfb1 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 19 Jun 2018 01:00:50 +0700 Subject: [PATCH] Add more tests with regards to escaping Signed-off-by: Rudi Grinberg --- test/unit-tests/sexp.mlt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/unit-tests/sexp.mlt b/test/unit-tests/sexp.mlt index 77a4f2a0..a460ec76 100644 --- a/test/unit-tests/sexp.mlt +++ b/test/unit-tests/sexp.mlt @@ -137,3 +137,28 @@ parse {|"$bar%foo%"|} [%%expect{| - : parse_result = Same (Ok ["$bar%foo%"]) |}] + +parse {|\%{foo}|} +[%%expect{| +- : parse_result = Same (Ok [\%{foo}]) +|}] + +parse {|\${foo}|} +[%%expect{| +- : parse_result = Same (Ok [\${foo}]) +|}] + +parse {|\$bar%foo%|} +[%%expect{| +- : parse_result = Same (Ok [\$bar%foo%]) +|}] + +parse {|\$bar\%foo%|} +[%%expect{| +- : parse_result = Same (Ok [\$bar\%foo%]) +|}] + +parse {|\$bar\%foo%{bar}|} +[%%expect{| +- : parse_result = Same (Ok [\$bar\%foo%{bar}]) +|}]