diff options
Diffstat (limited to 'tools/util_test.py')
-rw-r--r-- | tools/util_test.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/util_test.py b/tools/util_test.py index 308951bc2..e40d0aed0 100644 --- a/tools/util_test.py +++ b/tools/util_test.py @@ -1,5 +1,5 @@ # Copyright 2018 the Deno authors. All rights reserved. MIT license. -from util import pattern_match, parse_exit_code +from util import pattern_match, parse_exit_code, shell_quote_win def pattern_match_test(): @@ -34,9 +34,20 @@ def parse_exit_code_test(): assert 0 == parse_exit_code('hello_world') +def shell_quote_win_test(): + print "Testing util.shell_quote_win()..." + assert 'simple' == shell_quote_win('simple') + assert 'roof/\\isoprojection' == shell_quote_win('roof/\\isoprojection') + assert '"with space"' == shell_quote_win('with space') + assert '"embedded""quote"' == shell_quote_win('embedded"quote') + assert '"a""b""""c\\d\\\\""e\\\\\\\\"' == shell_quote_win( + 'a"b""c\\d\\"e\\\\') + + def util_test(): pattern_match_test() parse_exit_code_test() + shell_quote_win_test() if __name__ == '__main__': |