Skip to content

Commit bbb48ec

Browse files
mgermainMarcCote
authored andcommitted
Added some tests.
1 parent 63da0bc commit bbb48ec

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

smartdispatch/tests/test_smartdispatch.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ def test_get_commands_from_arguments():
8888
args = "echo [1 2]"
8989
assert_equal(smartdispatch.get_commands_from_arguments(args), ["echo 1", "echo 2"])
9090

91+
args = "echo test [1 2] yay"
92+
assert_equal(smartdispatch.get_commands_from_arguments(args), ["echo test 1 yay", "echo test 2 yay"])
93+
94+
args = "echo test[1 2]"
95+
assert_equal(smartdispatch.get_commands_from_arguments(args), ["echo test1", "echo test2"])
96+
97+
args = "echo test[1 2]yay"
98+
assert_equal(smartdispatch.get_commands_from_arguments(args), ["echo test1yay", "echo test2yay"])
99+
91100
# Test multiple unfolded arguments
92101
args = "python my_command.py [0.01 0.000001 0.00000000001] -1 [omicron mu]"
93102
assert_equal(smartdispatch.get_commands_from_arguments(args), ["python my_command.py 0.01 -1 omicron",

0 commit comments

Comments
 (0)