Commit 2b01eb6c2d76b941e4ba4c04450a6e18305c86c0

Stefan Sperling 2019-05-11T18:49:40

verify expected output in test_add_multiple and actually run this test

diff --git a/regress/cmdline/add.sh b/regress/cmdline/add.sh
index eba7073..ddbaf4a 100755
--- a/regress/cmdline/add.sh
+++ b/regress/cmdline/add.sh
@@ -76,8 +76,7 @@ function test_add_multiple {
 	echo "new file" > $testroot/wt/foo
 	echo "new file" > $testroot/wt/bar
 	echo "new file" > $testroot/wt/baz
-	(cd $testroot/wt && got add foo bar baz)
-
+	(cd $testroot/wt && got add foo bar baz > $testroot/stdout)
 	ret="$?"
 	if [ "$ret" != "0" ]; then
 		echo "got add failed unexpectedly" >&2
@@ -85,8 +84,18 @@ function test_add_multiple {
 		return 1
 	fi
 
+	echo "A  bar" > $testroot/stdout.expected
+	echo "A  baz" >> $testroot/stdout.expected
+	echo "A  foo" >> $testroot/stdout.expected
+
+	cmp $testroot/stdout.expected $testroot/stdout
+	ret="$?"
+	if [ "$ret" != "0" ]; then
+		diff -u $testroot/stdout.expected $testroot/stdout
+	fi
 	test_done "$testroot" "$ret"
 }
 
 run_test test_add_basic
 run_test test_double_add
+run_test test_add_multiple