Skip to content

Commit

Permalink
fixup! Add parse_args tests
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed May 9, 2024
1 parent c6e10c6 commit 53c4687
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions test/reporttests_script.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,8 @@ reference_suffix = VERSION >= v"1.7" ? "" : "_pre_1_7"
@test parsed.test_args == String["foo", "bar", "--", "baz"]

parsed = parse_args(split("script.jl -- foo bar -- baz"))
if VERSION >= v"1.9"
@test parsed.log_filename === nothing
@test parsed.test_args == String["foo", "bar", "--", "baz"]
else
@test parsed.log_filename === "foo"
@test parsed.test_args == String["bar", "--", "baz"]
end

parsed = parse_args(split("script.jl -- foo bar -- baz"))
if VERSION >= v"1.9"
@test parsed.log_filename === nothing
@test parsed.test_args == String["foo", "bar", "--", "baz"]
else
@test parsed.log_filename === "foo"
@test parsed.test_args == String["bar", "--", "baz"]
end
@test parsed.log_filename === nothing
@test parsed.test_args == String["foo", "bar", "--", "baz"]
end

@testset "executable" begin
Expand Down

0 comments on commit 53c4687

Please sign in to comment.