From ae21596241e6606c756596a6f7aeb9d73dbabdf4 Mon Sep 17 00:00:00 2001 From: bkaperick Date: Sun, 17 Dec 2023 12:13:38 -0500 Subject: [PATCH] Added test --- test/test_argparse.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/test_argparse.jl 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