Add tests for % and $ chars in atoms

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-06-17 12:49:08 +07:00
parent 3c74bf07e8
commit a9142840fd
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%"])
|}]