From ca1bd0ffd3a8baf96a484661543a6c6c53d2ddd7 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Fri, 24 Mar 2017 09:03:55 -0700 Subject: [PATCH] Add a test for as-> in the REPL Closes #1255. --- tests/test_bin.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_bin.py b/tests/test_bin.py index f670f2c..bc32749 100644 --- a/tests/test_bin.py +++ b/tests/test_bin.py @@ -103,6 +103,12 @@ def test_bin_hy_stdin_assignment(): assert "BY" not in output +def test_bin_hy_stdin_as_arrow(): + # https://github.com/hylang/hy/issues/1255 + output, _ = run_cmd("hy", "(as-> 0 it (inc it) (inc it))") + assert re.match(r"=>\s+2L?\s+=>", output) + + def test_bin_hy_stdin_hy_repr(): output, _ = run_cmd("hy", '(+ [1] [2])') assert "[1, 2]" in output.replace('L', '')