commit - 02c0700795c2aee56eaff4d72d82287aa84100ce
commit + e60e7f5bf0d3d27834b9712529836b42207853c8
blob - a8b9cefcc307030e04331f184e59aeca60c3a437
blob + 3123aa962f92c77f4df878cb009b10d7a0267610
--- regress/cmdline/checkout.sh
+++ regress/cmdline/checkout.sh
echo "Now shut up and hack" >> $testroot/stdout.expected
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
blob - 26ddd6de25bcabec49a91e174c0bf78866915007
blob + 024aa636ed561fff5445833afc0ed4404a77b639
--- regress/cmdline/status.sh
+++ regress/cmdline/status.sh
local testroot=`test_init status_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
- return 1
fi
-
- test_done "$testroot" "0"
+ test_done "$testroot" "$ret"
}
function test_status_subdir_no_mods {
git_commit $testroot/repo -m "add subdir with files"
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
- return 1
fi
-
- test_done "$testroot" "0"
+ test_done "$testroot" "$ret"
}
function test_status_subdir_no_mods2 {
git_commit $testroot/repo -m "add subdir with files"
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
- return 1
fi
-
- test_done "$testroot" "0"
+ test_done "$testroot" "$ret"
}
function test_status_obstructed {
local testroot=`test_init status_obstructed`
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
+ ret="$?"
if [ "$?" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
- return 1
fi
-
- test_done "$testroot" "0"
+ test_done "$testroot" "$ret"
}
function test_status_shows_local_mods_after_update {
ret="$?"
if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$ret"
- return 1
fi
-
- test_done "$testroot" "0"
+ test_done "$testroot" "$ret"
}
run_test test_status_basic
blob - 8e67c9af7bea04caf110cd7cbb8b29793de59b17
blob + e7ae6c144216594739f0afb77723057f5bf22b17
--- regress/cmdline/update.sh
+++ regress/cmdline/update.sh
local testroot=`test_init update_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
local testroot=`test_init update_adds_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
local testroot=`test_init update_deletes_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
local testroot=`test_init update_deletes_dir`
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
# check out the epsilon/ sub-tree
got checkout -p epsilon $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update -c $first_rev > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
# check out the epsilon/ sub-tree
got checkout -p epsilon $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update -c $first_rev > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
+ ret="$?"
if [ "$?" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
local testroot=`test_init update_sibling_dirs_with_common_prefix`
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
- return 1
fi
-
- test_done "$testroot" "0"
+ test_done "$testroot" "$ret"
}
function test_update_dir_with_dot_sibling {
local testroot=`test_init update_dir_with_dot_sibling`
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$ret"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
- return 1
fi
-
- test_done "$testroot" "0"
+ test_done "$testroot" "$ret"
}
function test_update_moves_files_upwards {
git_commit $testroot/repo -m "adding a sub-directory beneath epsilon"
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
git_commit $testroot/repo -m "adding a sub-directory beneath epsilon"
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
git_commit $testroot/repo -m "adding initial snake tree"
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
- diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
- return 1
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ diff -u $testroot/stdout.expected $testroot/stdout
fi
-
- test_done "$testroot" "0"
+ test_done "$testroot" "$ret"
}
function test_update_creates_missing_parent_with_subdir {
git_commit $testroot/repo -m "adding initial snake tree"
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
git_commit $testroot/repo -m "adding initial tree"
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi
git_commit $testroot/repo -m "added numbers file"
got checkout $testroot/repo $testroot/wt > /dev/null
- if [ "$?" != "0" ]; then
- test_done "$testroot" "$?"
+ ret="$?"
+ if [ "$ret" != "0" ]; then
+ test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp $testroot/stdout.expected $testroot/stdout
- if [ "$?" != "0" ]; then
+ ret="$?"
+ if [ "$ret" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
- test_done "$testroot" "$?"
+ test_done "$testroot" "$ret"
return 1
fi