Skip to content

Commit

Permalink
Add back test files for issue #132 but run them with the other files.…
Browse files Browse the repository at this point in the history
… Revise an in-memory test of #132 to actually test windows newlines. Add back revision of windows_newlines.yaml.
  • Loading branch information
GunnarFarneback committed Jun 28, 2024
1 parent cc50565 commit a6cc71e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/julia/issue132.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Dict{Any, Any}(
"creator" => "LAMMPS",
"timestep" => 0,
)
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const tests = [
"issue30",
"issue36",
"issue39",
"issue132",
"cartesian",
"ar1",
"ar1_cartesian",
Expand Down Expand Up @@ -407,9 +408,11 @@ end
timestep: 1
...
"""
input_crlf = replace(input, "\n" => "\r\n")
expected = [Dict("creator" => "LAMMPS", "timestep" => 0),
Dict("creator" => "LAMMPS", "timestep" => 1)]
@test collect(YAML.load_all(input)) == expected
@test collect(YAML.load_all(input_crlf)) == expected
end

# issue #148 - warn unknown directives
Expand Down
8 changes: 8 additions & 0 deletions test/yaml/issue132.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
creator: LAMMPS
timestep: 0
...
---
creator: LAMMPS
timestep: 1
...
1 change: 0 additions & 1 deletion test/yaml/windows_newlines.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
hello:

0 comments on commit a6cc71e

Please sign in to comment.