@@ -11,15 +11,11 @@ defmodule Mix.Tasks.DoTest do
1111 end
1212 end
1313
14- test "gather_command ignore spaces and trailing commas " do
14+ test "gather_command returns a list of commands " do
1515 import Mix.Tasks.Do , only: [ gather_commands: 1 ]
1616 assert gather_commands ( [ "compile" , "--list," , "help" ] ) == [ [ "compile" , "--list" ] , [ "help" ] ]
17- assert gather_commands ( [ "compile" , "--list,help" ] ) == [ [ "compile" , "--list" ] , [ "help" ] ]
18- assert gather_commands ( [ "help" , ",compile" , "--list" ] ) == [ [ "help" ] , [ "compile" , "--list" ] ]
19- assert gather_commands ( [ "compile" , "--list" , "," , "help" ] ) == [ [ "compile" , "--list" ] , [ "help" ] ]
17+ assert gather_commands ( [ "help," , "compile" , "--list" ] ) == [ [ "help" ] , [ "compile" , "--list" ] ]
2018 assert gather_commands ( [ "compile," , "run" , "-e" , "IO.puts :hello" ] ) == [ [ "compile" ] , [ "run" , "-e" , "IO.puts :hello" ] ]
21- assert gather_commands (
22- [ "," , "compile," , "run" , "-e" , "IO.puts :hello" , ",foo" , "--bar" , "--baz" , "," , "baz,qux,abc" , "," ] ) ==
23- [ [ "compile" ] , [ "run" , "-e" , "IO.puts :hello" ] , [ "foo" , "--bar" , "--baz" ] , [ "baz" ] , [ "qux" ] , [ "abc" ] ]
19+ assert gather_commands ( [ "compile," , "run" , "-e" , "[1, 2]" ] ) == [ [ "compile" ] , [ "run" , "-e" , "[1, 2]" ] ]
2420 end
2521end
0 commit comments