From 74e064c82cad1f708ed4d47dc94b1e634022826b Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Tue, 24 May 2022 13:33:34 +0900 Subject: [PATCH] Test case for preceding fix --- test/testForIf.krk | 9 +++++++++ test/testForIf.krk.expect | 1 + 2 files changed, 10 insertions(+) create mode 100644 test/testForIf.krk create mode 100644 test/testForIf.krk.expect diff --git a/test/testForIf.krk b/test/testForIf.krk new file mode 100644 index 0000000..0291965 --- /dev/null +++ b/test/testForIf.krk @@ -0,0 +1,9 @@ + +let candidates = {'foo','bar','baz'} + +let values = { + x for x in ['foo','bar','baz','qux'] + if x in candidates +} + +print(sorted(list(values))) diff --git a/test/testForIf.krk.expect b/test/testForIf.krk.expect new file mode 100644 index 0000000..e06219c --- /dev/null +++ b/test/testForIf.krk.expect @@ -0,0 +1 @@ +['bar', 'baz', 'foo']