@@ -6,7 +6,7 @@ using YAML: YAML
66
77function yaml_block (str, block_scalar)
88 yaml = " example: $block_scalar \n $(indent (str, 2 )) "
9- YAML. load (yaml)[" example" ]
9+ return YAML. load (yaml)[" example" ]
1010end
1111
1212const TEST_STRINGS = [
5151 @test multiline (str, :literal , :clip ) == expected_lc
5252 @test multiline (str, :literal , :strip ) == expected_ls
5353
54- @test multiline (str, style= :literal , chomp= :keep ) == expected_lk
55- @test multiline (str, style= :literal , chomp= :clip ) == expected_lc
56- @test multiline (str, style= :literal , chomp= :strip ) == expected_ls
54+ @test multiline (str; style= :literal , chomp= :keep ) == expected_lk
55+ @test multiline (str; style= :literal , chomp= :clip ) == expected_lc
56+ @test multiline (str; style= :literal , chomp= :strip ) == expected_ls
5757
5858 @test multiline (str, " lk" ) == expected_lk
5959 @test multiline (str, " lc" ) == expected_lc
6868 @test multiline (str, :folded , :clip ) == expected_fc
6969 @test multiline (str, :folded , :strip ) == expected_fs
7070
71- @test multiline (str, style= :folded , chomp= :keep ) == expected_fk
72- @test multiline (str, style= :folded , chomp= :clip ) == expected_fc
73- @test multiline (str, style= :folded , chomp= :strip ) == expected_fs
71+ @test multiline (str; style= :folded , chomp= :keep ) == expected_fk
72+ @test multiline (str; style= :folded , chomp= :clip ) == expected_fc
73+ @test multiline (str; style= :folded , chomp= :strip ) == expected_fs
7474
7575 @test multiline (str, " fk" ) == expected_fk
7676 @test multiline (str, " fc" ) == expected_fc
8181 end
8282
8383 @testset " default chomp" begin
84- @test multiline (str, style= :literal ) == expected_ls
85- @test multiline (str, style= :folded ) == expected_fs
84+ @test multiline (str; style= :literal ) == expected_ls
85+ @test multiline (str; style= :folded ) == expected_fs
8686
8787 @test multiline (str, " l" ) == expected_ls
8888 @test multiline (str, " f" ) == expected_fs
9292 end
9393
9494 @testset " default style" begin
95- @test multiline (str, chomp= :keep ) == expected_fk
96- @test multiline (str, chomp= :clip ) == expected_fc
97- @test multiline (str, chomp= :strip ) == expected_fs
95+ @test multiline (str; chomp= :keep ) == expected_fk
96+ @test multiline (str; chomp= :clip ) == expected_fc
97+ @test multiline (str; chomp= :strip ) == expected_fs
9898
9999 @test multiline (str, " k" ) == expected_fk
100100 @test multiline (str, " c" ) == expected_fc
131131 # The quoting in these examples can result in exceptions being raised during parsing
132132 # if handled incorrectly.
133133 @test interpolate (" \"\\ n\" " ) == " \"\\ n\" "
134- @test interpolate (" \$ (join([\" a\" , \" b\" ], \" , \" ))" ) == Expr (:string , :(join ([" a" , " b" ], " , " )))
134+ @test interpolate (" \$ (join([\" a\" , \" b\" ], \" , \" ))" ) ==
135+ Expr (:string , :(join ([" a" , " b" ], " , " )))
135136 end
136137
137138 @testset " @m_str" begin
0 commit comments