From a9142840fd9c3e1f8b841c30c81cac02c1f1bfa4 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 17 Jun 2018 12:49:08 +0700 Subject: [PATCH 1/2] Add tests for % and $ chars in atoms Signed-off-by: Rudi Grinberg --- test/unit-tests/sexp.mlt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/unit-tests/sexp.mlt b/test/unit-tests/sexp.mlt index 2fb9aeaf..77a4f2a0 100644 --- a/test/unit-tests/sexp.mlt +++ b/test/unit-tests/sexp.mlt @@ -107,3 +107,33 @@ parse {|"\%{x}"|} - : parse_result = Different {jbuild = Ok ["\\%{x}"]; dune = Error "unknown escape sequence"} |}] + +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%"|} +[%%expect{| +- : parse_result = Same (Ok ["%bar$foo%"]) +|}] + +parse {|"$bar%foo%"|} +[%%expect{| +- : parse_result = Same (Ok ["$bar%foo%"]) +|}] From b53ec8581927ca61545fa91124c3a1104b0f4e37 Mon Sep 17 00:00:00 2001 From: Ryan Slade Date: Mon, 18 Jun 2018 12:40:14 +0200 Subject: [PATCH 2/2] Fix typo (#890) Signed-off-by: Ryan Slade --- doc/tests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tests.rst b/doc/tests.rst index c32e16f3..bb7df7ab 100644 --- a/doc/tests.rst +++ b/doc/tests.rst @@ -127,7 +127,7 @@ following test elements are clearly identified: - the test expectation - the test outcome -You can have a look at `this blob post +You can have a look at `this blog post `_ to find out more about expectation tests. But Back to Jbuilder, the workflow for expectation tests is always as follow: