parse_test: test unwanted stdin
Lars Gierth committed
May 20, 2015 at 04:23 UTC
4e0ca860e9f9828dcebb54877ecdb29757619027
1 file changed
+3
commands/cli/parse_test.go
+3
@@ -268,4 +268,7 @@ func TestArgumentParsing(t *testing.T) {
268
fstdin = fileToSimulateStdin(t, "stdin1")
269
test([]string{"stdinenablednotvariadic2args", "value1"}, fstdin, []string{"value1", "stdin1"})
270
test([]string{"stdinenablednotvariadic2args", "value1", "value2"}, fstdin, []string{"value1", "value2"})
271
+
272
+ fstdin = fileToSimulateStdin(t, "stdin1")
273
+ test([]string{"noarg"}, fstdin, []string{})
274
}