New test: Ensure the compiler chokes on missing keyword argument values

This commit is contained in:
Ewald Grusk 2015-06-22 20:18:04 +02:00 committed by Gergely Nagy
parent 4138c660cc
commit e407b0a605

View File

@ -439,6 +439,16 @@ def test_lambda_list_keywords_mixed():
" (list x xs kwxs kwoxs))")
def test_missing_keyword_argument_value():
"""Ensure the compiler chokes on missing keyword argument values."""
try:
can_compile("((fn [x] x) :x)")
except HyTypeError as e:
assert(e.message == "Keyword argument \ufdd0:x needs a value.")
else:
assert(False)
def test_ast_unicode_strings():
"""Ensure we handle unicode strings correctly"""