commit 8d301dd94ca3964729aa83b8031e7502a1111f49 from: Stefan Sperling date: Tue May 14 15:35:15 2019 UTC use cmp -s, instead of cmp, in all command line tests commit - 3eada727868aaa9cde33edc9bc9cbf248f9af3b0 commit + 8d301dd94ca3964729aa83b8031e7502a1111f49 blob - ddbaf4a87665ff09850e0cb12679e18bb8b07138 blob + da716a3db5a59725b149f466b4ee42fbe4b82d12 --- regress/cmdline/add.sh +++ regress/cmdline/add.sh @@ -31,7 +31,7 @@ function test_add_basic { echo 'A foo' > $testroot/stdout.expected (cd $testroot/wt && got add foo > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -88,7 +88,7 @@ function test_add_multiple { echo "A baz" >> $testroot/stdout.expected echo "A foo" >> $testroot/stdout.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout blob - 3123aa962f92c77f4df878cb009b10d7a0267610 blob + 5ddd473dfa87ec48c9de2af60e5d77fdf26a9842 --- regress/cmdline/checkout.sh +++ regress/cmdline/checkout.sh @@ -32,7 +32,7 @@ function test_checkout_basic { return 1 fi - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -47,7 +47,7 @@ function test_checkout_basic { cat $testroot/wt/alpha $testroot/wt/beta $testroot/wt/epsilon/zeta \ $testroot/wt/gamma/delta > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -73,7 +73,7 @@ function test_checkout_sets_xbit { return 1 fi - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout blob - 668767cbe1dbdf3fe334cf8a4f899fee4116bb5c blob + 454a2907eb42bfb61730e321b0e5e7d55abf7901 --- regress/cmdline/commit.sh +++ regress/cmdline/commit.sh @@ -39,7 +39,7 @@ function test_commit_basic { echo "D beta" >> $testroot/stdout.expected echo "created commit $head_rev" >> $testroot/stdout.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -71,7 +71,7 @@ function test_commit_new_subdir { echo "A d/new2" >> $testroot/stdout.expected echo "created commit $head_rev" >> $testroot/stdout.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -99,7 +99,7 @@ function test_commit_subdir { echo "M epsilon/zeta" >> $testroot/stdout.expected echo "created commit $head_rev" >> $testroot/stdout.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -127,7 +127,7 @@ function test_commit_single_file { echo "M epsilon/zeta" >> $testroot/stdout.expected echo "created commit $head_rev" >> $testroot/stdout.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -158,7 +158,7 @@ function test_commit_out_of_date { echo "got: work tree must be updated before these" \ "changes can be committed" > $testroot/stderr.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -166,7 +166,7 @@ function test_commit_out_of_date { return 1 fi - cmp $testroot/stderr.expected $testroot/stderr + cmp -s $testroot/stderr.expected $testroot/stderr ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stderr.expected $testroot/stderr blob - a41a7e7b89425d5dab35003ae2f70510871dc005 blob + 9193624ff0a715ee9b6277aa6ffaa68cbcd8f4de --- regress/cmdline/diff.sh +++ regress/cmdline/diff.sh @@ -58,7 +58,7 @@ function test_diff_basic { echo '+new file' >> $testroot/stdout.expected (cd $testroot/wt && got diff > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -100,7 +100,7 @@ function test_diff_shows_conflict { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -128,7 +128,7 @@ function test_diff_shows_conflict { (cd $testroot/wt && got diff > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout blob - a5272f0679c901661f2534ddda6379d6a402314d blob + 11f0724fc95a705812f15b4d42b2e204fbaebb8f --- regress/cmdline/log.sh +++ regress/cmdline/log.sh @@ -25,7 +25,7 @@ function test_log_in_repo { for p in "" "." alpha epsilon epsilon/zeta; do (cd $testroot/repo && got log $p | \ grep ^commit > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -37,7 +37,7 @@ function test_log_in_repo { for p in "" "." zeta; do (cd $testroot/repo/epsilon && got log $p | \ grep ^commit > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -58,7 +58,7 @@ function test_log_in_bare_repo { for p in "" "." alpha epsilon epsilon/zeta; do (cd $testroot/repo/.git && got log $p | \ grep ^commit > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -86,7 +86,7 @@ function test_log_in_worktree { for p in "" "." alpha epsilon; do (cd $testroot/wt && got log $p | \ grep ^commit > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -98,7 +98,7 @@ function test_log_in_worktree { for p in "" "." zeta; do (cd $testroot/wt/epsilon && got log $p | \ grep ^commit > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout blob - 4c59fbdebed9af30db2c55f99c3b569c552e8c31 blob + 584c34ece375b5bcf37239b7a0182a3c669c81a2 --- regress/cmdline/revert.sh +++ regress/cmdline/revert.sh @@ -32,7 +32,7 @@ function test_revert_basic { (cd $testroot/wt && got revert alpha > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -43,7 +43,7 @@ function test_revert_basic { echo "alpha" > $testroot/content.expected cat $testroot/wt/alpha > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -68,7 +68,7 @@ function test_revert_rm { (cd $testroot/wt && got revert beta > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -79,7 +79,7 @@ function test_revert_rm { echo "beta" > $testroot/content.expected cat $testroot/wt/beta > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -104,7 +104,7 @@ function test_revert_add { (cd $testroot/wt && got revert new > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -115,7 +115,7 @@ function test_revert_add { echo "new file" > $testroot/content.expected cat $testroot/wt/new > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -127,7 +127,7 @@ function test_revert_add { (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout blob - e0f866bb327f00e152a18a34b9ceade7e5a69655 blob + bb717cac07e1b3f367f8a6d63f607e748587f356 --- regress/cmdline/rm.sh +++ regress/cmdline/rm.sh @@ -29,7 +29,7 @@ function test_rm_basic { echo 'D beta' > $testroot/stdout.expected (cd $testroot/wt && got rm beta > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -58,7 +58,7 @@ function test_rm_with_local_mods { echo 'got: file contains modifications' > $testroot/stderr.expected (cd $testroot/wt && got rm beta 2>$testroot/stderr) - cmp $testroot/stderr.expected $testroot/stderr + cmp -s $testroot/stderr.expected $testroot/stderr ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stderr.expected $testroot/stderr @@ -69,7 +69,7 @@ function test_rm_with_local_mods { echo 'D beta' > $testroot/stdout.expected (cd $testroot/wt && got rm -f beta > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout blob - 6153d36c2d585a109a3c72d16d412dda24c7d84e blob + 4829d1e981ef5182075703688d560e43f0e94747 --- regress/cmdline/status.sh +++ regress/cmdline/status.sh @@ -42,7 +42,7 @@ function test_status_basic { (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -76,7 +76,7 @@ function test_status_subdir_no_mods { # ? Basic/Targets.cpp (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -120,7 +120,7 @@ function test_status_subdir_no_mods2 { # ? Frontend/Rewrite/CMakeLists.txt (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -145,7 +145,7 @@ function test_status_obstructed { (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$?" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -187,7 +187,7 @@ function test_status_shows_local_mods_after_update { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -199,7 +199,7 @@ function test_status_shows_local_mods_after_update { (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -247,7 +247,7 @@ function test_status_unversioned_subdirs { # ? ramdisk_cd/list.local (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -277,7 +277,7 @@ function test_status_ignores_symlink { (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -318,7 +318,7 @@ function test_status_shows_no_mods_after_complete_merg (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -330,7 +330,7 @@ function test_status_shows_no_mods_after_complete_merg (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -372,7 +372,7 @@ function test_status_shows_conflict { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -384,7 +384,7 @@ function test_status_shows_conflict { (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout blob - 00c8418960dd9b88696917d8441bb984e4f94d46 blob + 3c6429593ca295ae154c301420e7717af1201161 --- regress/cmdline/update.sh +++ regress/cmdline/update.sh @@ -36,7 +36,7 @@ function test_update_basic { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -47,7 +47,7 @@ function test_update_basic { echo "modified alpha" > $testroot/content.expected cat $testroot/wt/alpha > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -76,7 +76,7 @@ function test_update_adds_file { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -87,7 +87,7 @@ function test_update_adds_file { echo "new" >> $testroot/content.expected cat $testroot/wt/gamma/new > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -115,7 +115,7 @@ function test_update_deletes_file { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -152,7 +152,7 @@ function test_update_deletes_dir { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -192,7 +192,7 @@ function test_update_deletes_dir_with_path_prefix { (cd $testroot/wt && got update -c $first_rev > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -235,7 +235,7 @@ function test_update_deletes_dir_recursively { (cd $testroot/wt && got update -c $first_rev > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$?" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -277,7 +277,7 @@ function test_update_sibling_dirs_with_common_prefix { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -299,7 +299,7 @@ function test_update_sibling_dirs_with_common_prefix { # A epsilon2/mu <--- not intended (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -307,7 +307,7 @@ function test_update_sibling_dirs_with_common_prefix { return 1 fi - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -339,7 +339,7 @@ function test_update_dir_with_dot_sibling { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -357,7 +357,7 @@ function test_update_dir_with_dot_sibling { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -365,7 +365,7 @@ function test_update_dir_with_dot_sibling { return 1 fi - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -404,7 +404,7 @@ function test_update_moves_files_upwards { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -459,7 +459,7 @@ function test_update_moves_files_to_new_dir { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -526,7 +526,7 @@ function test_update_creates_missing_parent { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -578,7 +578,7 @@ function test_update_creates_missing_parent_with_subdi (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -618,7 +618,7 @@ function test_update_file_in_subsubdir { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -668,7 +668,7 @@ function test_update_merges_file_edits { (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -697,7 +697,7 @@ function test_update_merges_file_edits { cat $testroot/wt/beta >> $testroot/content cat $testroot/wt/numbers >> $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -735,7 +735,7 @@ function test_update_keeps_xbit { return 1 fi - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -793,7 +793,7 @@ function test_update_clears_xbit { return 1 fi - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -828,7 +828,7 @@ function test_update_restores_missing_file { echo >> $testroot/stdout.expected (cd $testroot/wt && got update > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -840,7 +840,7 @@ function test_update_restores_missing_file { cat $testroot/wt/alpha > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -871,7 +871,7 @@ function test_update_conflict_wt_add_vs_repo_add { echo -n "Updated to commit " >> $testroot/stdout.expected git_show_head $testroot/repo >> $testroot/stdout.expected echo >> $testroot/stdout.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -889,7 +889,7 @@ function test_update_conflict_wt_add_vs_repo_add { cat $testroot/wt/gamma/new > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -901,7 +901,7 @@ function test_update_conflict_wt_add_vs_repo_add { echo "new and also new" > $testroot/wt/gamma/new echo 'M gamma/new' > $testroot/stdout.expected (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -930,7 +930,7 @@ function test_update_conflict_wt_edit_vs_repo_rm { echo -n "Updated to commit " >> $testroot/stdout.expected git_show_head $testroot/repo >> $testroot/stdout.expected echo >> $testroot/stdout.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -942,7 +942,7 @@ function test_update_conflict_wt_edit_vs_repo_rm { cat $testroot/wt/beta > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -953,7 +953,7 @@ function test_update_conflict_wt_edit_vs_repo_rm { # beta is now an added file... we don't flag tree conflicts yet echo 'A beta' > $testroot/stdout.expected (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -982,7 +982,7 @@ function test_update_conflict_wt_rm_vs_repo_edit { echo -n "Updated to commit " >> $testroot/stdout.expected git_show_head $testroot/repo >> $testroot/stdout.expected echo >> $testroot/stdout.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -993,7 +993,7 @@ function test_update_conflict_wt_rm_vs_repo_edit { # beta remains a deleted file... we don't flag tree conflicts yet echo 'D beta' > $testroot/stdout.expected (cd $testroot/wt && got status > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -1014,7 +1014,7 @@ function test_update_conflict_wt_rm_vs_repo_edit { echo '-modified beta' >> $testroot/stdout.expected (cd $testroot/wt && got diff > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -1043,7 +1043,7 @@ function test_update_conflict_wt_rm_vs_repo_rm { echo -n "Updated to commit " >> $testroot/stdout.expected git_show_head $testroot/repo >> $testroot/stdout.expected echo >> $testroot/stdout.expected - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -1054,7 +1054,7 @@ function test_update_conflict_wt_rm_vs_repo_rm { # beta is now gone... we don't flag tree conflicts yet echo 'got: bad path' > $testroot/stderr.expected (cd $testroot/wt && got status beta 2> $testroot/stderr) - cmp $testroot/stderr.expected $testroot/stderr + cmp -s $testroot/stderr.expected $testroot/stderr ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stderr.expected $testroot/stderr @@ -1094,7 +1094,7 @@ function test_update_partial { (cd $testroot/wt && got update $f > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -1105,7 +1105,7 @@ function test_update_partial { echo "modified $f" > $testroot/content.expected cat $testroot/wt/$f > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -1139,7 +1139,7 @@ function test_update_partial_add { (cd $testroot/wt && got update $f > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -1150,7 +1150,7 @@ function test_update_partial_add { echo "$f" > $testroot/content.expected cat $testroot/wt/$f > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -1187,7 +1187,7 @@ function test_update_partial_rm { return 1 fi - cmp $testroot/stderr.expected $testroot/stderr + cmp -s $testroot/stderr.expected $testroot/stderr ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stderr.expected $testroot/stderr @@ -1220,7 +1220,7 @@ function test_update_partial_dir { (cd $testroot/wt && got update epsilon > $testroot/stdout) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -1231,7 +1231,7 @@ function test_update_partial_dir { echo "modified epsilon/zeta" > $testroot/content.expected cat $testroot/wt/epsilon/zeta > $testroot/content - cmp $testroot/content.expected $testroot/content + cmp -s $testroot/content.expected $testroot/content ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/content.expected $testroot/content @@ -1268,7 +1268,7 @@ function test_update_moved_branch_ref { (cd $testroot/wt && got update > $testroot/stdout 2> $testroot/stderr) - cmp $testroot/stdout.expected $testroot/stdout + cmp -s $testroot/stdout.expected $testroot/stdout ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stdout.expected $testroot/stdout @@ -1276,7 +1276,7 @@ function test_update_moved_branch_ref { return 1 fi - cmp $testroot/stderr.expected $testroot/stderr + cmp -s $testroot/stderr.expected $testroot/stderr ret="$?" if [ "$ret" != "0" ]; then diff -u $testroot/stderr.expected $testroot/stderr