parse_test: test multiline stdin
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Christian Couder committed
May 17, 2015 at 20:34 UTC
ff9cb9ecf4a41e1e1cc52102145372cda5a7af5c
1 file changed
+6
commands/cli/parse_test.go
+6
@@ -224,4 +224,10 @@ func TestArgumentParsing(t *testing.T) {
224
test([]string{"stdinenabled"}, fstdin, []string{"stdin1"})
225
test([]string{"stdinenabled", "value1"}, fstdin, []string{"stdin1", "value1"})
226
test([]string{"stdinenabled", "value1", "value2"}, fstdin, []string{"stdin1", "value1", "value2"})
227
+
228
+ fstdin = fileToSimulateStdin(t, "stdin1\nstdin2")
229
+ test([]string{"stdinenabled"}, fstdin, []string{"stdin1", "stdin2"})
230
+
231
+ fstdin = fileToSimulateStdin(t, "stdin1\nstdin2\nstdin3")
232
+ test([]string{"stdinenabled"}, fstdin, []string{"stdin1", "stdin2", "stdin3"})
233
}