File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -303,13 +303,13 @@ foo
303
303
test "evaluates the source from a given file" do
304
304
filename = Path . join ( __DIR__ , "fixtures/eex_template.eex" )
305
305
result = EEx . eval_file ( filename )
306
- assert result == "foo bar.\n "
306
+ assert result == "foo bar." <> os_newline
307
307
end
308
308
309
309
test "evaluates the source from a given file with bindings" do
310
310
filename = Path . join ( __DIR__ , "fixtures/eex_template_with_bindings.eex" )
311
311
result = EEx . eval_file ( filename , [ bar: 1 ] )
312
- assert result == "foo 1\n "
312
+ assert result == "foo 1" <> os_newline
313
313
end
314
314
315
315
test "raises an Exception when there's an error with the given file" do
324
324
end
325
325
326
326
test "defined from file" do
327
- assert EExText.Compiled . file_sample ( 1 ) == "foo 1\n "
327
+ assert EExText.Compiled . file_sample ( 1 ) == "foo 1" <> os_newline
328
328
end
329
329
330
330
test "defined from file do not affect backtrace" do
356
356
}
357
357
end
358
358
359
+ defp os_newline do
360
+ case :os . type do
361
+ { :win32 , _ } -> "\r \n "
362
+ _ -> "\n "
363
+ end
364
+ end
365
+
359
366
defmodule TestEngine do
360
367
@ behaviour EEx.Engine
361
368
You can’t perform that action at this time.
0 commit comments