Add more tests with regards to escaping

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-06-19 01:00:50 +07:00
parent 19908abf4d
commit ec8860d0be
1 changed files with 25 additions and 0 deletions

View File

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