diff --git a/test/test_argparse.jl b/test/test_argparse.jl new file mode 100644 index 0000000..5abc7ca --- /dev/null +++ b/test/test_argparse.jl @@ -0,0 +1,10 @@ +using Test +using DaemonMode + +@testset "Test argument parsing" begin + @test DaemonMode.parse_arguments("arg1 \"arg2 is in quotes\" arg3") == ["arg1", "arg2 is in quotes", "arg3"] + + @test DaemonMode.parse_arguments("arg1 arg2 \"arg3 is in quotes\"") == ["arg1", "arg2", "arg3 is in quotes"] + + @test DaemonMode.parse_arguments("arg1 arg2 \"arg3 has escaped \\\"quotes\\\"") == ["arg1", "arg2", "arg3 has escaped \"quotes\""] +end