Merge pull request #888 from rgrinberg/escaping-tests-sexp

Add tests for % and $ chars in atoms
This commit is contained in:
Rudi Grinberg 2018-06-18 17:45:19 +07:00 committed by GitHub
commit 5e753d0c3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 0 deletions

View File

@ -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%"])
|}]