@@ -155,18 +155,30 @@ defmodule ParameterizedTestTest do
155155
156156 param_test "interprets otherwise unparseable values as strings" ,
157157 """
158- | value | unquoted string key |
159- |---------|---------------------|
160- | 1 | foo, bar |
161- | 2 3 4 | |
158+ | value | unquoted string key |
159+ |---------|------------------------------|
160+ | 1 | foo, bar & baz |
161+ | 2 3 4 | |
162+ | 5 | Won't error out |
163+ | 6 | a !@#$%^&*():"_;',./][}{<> z |
164+ | 7 | %{shoes: 19_99, |
162165 """ ,
163166 % { value: value , "unquoted string key": unquoted } do
164167 case value do
165168 1 ->
166- assert unquoted == "foo, bar"
169+ assert unquoted == "foo, bar & baz "
167170
168171 "2 3 4" ->
169172 assert is_nil ( unquoted )
173+
174+ 5 ->
175+ assert unquoted == "Won't error out"
176+
177+ 6 ->
178+ assert unquoted == "a !@#$%^&*():\" _;',./][}{<> z"
179+
180+ 7 ->
181+ assert unquoted == "%{shoes: 19_99,"
170182 end
171183 end
172184
@@ -298,28 +310,10 @@ defmodule ParameterizedTestTest do
298310 end
299311 end
300312
301- test "fails to compile Markdown rows with invalid Elixir in them" do
302- assert_raise RuntimeError , fn ->
303- defmodule FailToEvaluateBadMarkdownTest do
304- use ExUnit.Case , async: true
305-
306- import ParameterizedTest
307-
308- param_test "test with invalid Elixir in a cell" ,
309- """
310- | spending_by_category |
311- | %{shoes: 19_99, |
312- """ ,
313- % { gets_free_shipping?: gets_free_shipping? } do
314- assert gets_free_shipping?
315- end
316- end
317- end
318- end
319-
320313 test "fails to compile when the keys in a handrolled list don't all match" do
321314 assert_raise RuntimeError , fn ->
322- defmodule FailToEvaluateBadMarkdownTest do
315+ defmodule FailToEvaluateMismatchedKeys do
316+ @ moduledoc false
323317 use ExUnit.Case , async: true
324318
325319 import ParameterizedTest
0 commit comments