commit - 23c57b285fdcf9a8a0a5913ea096232038bf0ac3
commit + f6cae3ed1ef0c22150181eeebb8f9e97db99dc5a
blob - 979b689d1935adced1a04b6f2a21036b105f593c
blob + 85158592b22bb11f1035f97ad4835826c2218789
--- regress/cmdline/add.sh
+++ regress/cmdline/add.sh
. ./common.sh
-function test_add_basic {
+test_add_basic() {
local testroot=`test_init add_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_double_add {
+test_double_add() {
local testroot=`test_init double_add`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_add_multiple {
+test_add_multiple() {
local testroot=`test_init multiple_add`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_add_file_in_new_subdir {
+test_add_file_in_new_subdir() {
local testroot=`test_init add_file_in_new_subdir`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_add_deleted {
+test_add_deleted() {
local testroot=`test_init add_deleted`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_add_directory {
+test_add_directory() {
local testroot=`test_init add_directory`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_add_clashes_with_submodule {
+test_add_clashes_with_submodule() {
local testroot=`test_init add_clashes_with_submodule`
make_single_file_repo $testroot/repo2 foo
test_done "$testroot" "$ret"
}
-function test_add_symlink {
+test_add_symlink() {
local testroot=`test_init add_symlink`
got checkout $testroot/repo $testroot/wt > /dev/null
blob - cb4a9f95c2ad5d5d0bb9dab9f459134623827439
blob + 219e1fb124feebc4ea8b077b5fbe2cc78e072f34
--- regress/cmdline/backout.sh
+++ regress/cmdline/backout.sh
. ./common.sh
-function test_backout_basic {
+test_backout_basic() {
local testroot=`test_init backout_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_backout_edits_for_file_since_deleted {
+test_backout_edits_for_file_since_deleted() {
local testroot=`test_init backout_edits_for_file_since_deleted`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_backout_next_commit {
+test_backout_next_commit() {
local testroot=`test_init backout_next_commit`
local commit0=`git_show_head $testroot/repo`
blob - 892fc732795868f3edccc6adaaf43e368add9928
blob + 10d305bc5b630ca236e00ba304d323a7c271501d
--- regress/cmdline/blame.sh
+++ regress/cmdline/blame.sh
. ./common.sh
-function blame_cmp {
+blame_cmp() {
local testroot="$1"
local file="$2"
local xfail="$3"
return "$ret"
}
-function test_blame_basic {
+test_blame_basic() {
local testroot=`test_init blame_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_blame_tag {
+test_blame_tag() {
local testroot=`test_init blame_tag`
local tag=1.0.0
test_done "$testroot" "$ret"
}
-function test_blame_file_single_line {
+test_blame_file_single_line() {
local testroot=`test_init blame_file_single_line`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_blame_file_single_line_no_newline {
+test_blame_file_single_line_no_newline() {
local testroot=`test_init blame_file_single_line_no_newline`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_blame_all_lines_replaced {
+test_blame_all_lines_replaced() {
local testroot=`test_init blame_all_lines_replaced`
got checkout $testroot/repo $testroot/wt > /dev/null
}
-function test_blame_lines_shifted_up {
+test_blame_lines_shifted_up() {
local testroot=`test_init blame_lines_shifted_up`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_blame_lines_shifted_down {
+test_blame_lines_shifted_down() {
local testroot=`test_init blame_lines_shifted_down`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_blame_commit_subsumed {
+test_blame_commit_subsumed() {
local testroot=`test_init blame_commit_subsumed`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_blame_blame_h {
+test_blame_blame_h() {
local testroot=`test_init blame_blame_h`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_blame_added_on_branch {
+test_blame_added_on_branch() {
local testroot=`test_init blame_added_on_branch`
got branch -r $testroot/repo -c master newbranch
test_done "$testroot" "$ret"
}
-function test_blame_submodule {
+test_blame_submodule() {
local testroot=`test_init blame_submodule`
local commit_id0=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_blame_symlink {
+test_blame_symlink() {
local testroot=`test_init blame_symlink`
local commit_id0=`git_show_head $testroot/repo`
local short_commit0=`trim_obj_id 32 $commit_id0`
blob - 91a36a5d9eaeb6170ed3dbab654218e4f01568f7
blob + 9fa183b2eebc74ed731072735c4286255113533b
--- regress/cmdline/branch.sh
+++ regress/cmdline/branch.sh
. ./common.sh
-function test_branch_create {
+test_branch_create() {
local testroot=`test_init branch_create`
local commit_id0=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_branch_list {
+test_branch_list() {
local testroot=`test_init branch_list`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_branch_delete {
+test_branch_delete() {
local testroot=`test_init branch_delete`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_branch_delete_current_branch {
+test_branch_delete_current_branch() {
local testroot=`test_init branch_delete_current_branch`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_branch_delete_packed {
+test_branch_delete_packed() {
local testroot=`test_init branch_delete_packed`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_branch_show {
+test_branch_show() {
local testroot=`test_init branch_show`
local commit_id=`git_show_head $testroot/repo`
blob - 732a0c8020d30553b7a2424e9ef32a29d071c966
blob + f2bd8da09c99bb8206cff02563a53409c9f80351
--- regress/cmdline/cat.sh
+++ regress/cmdline/cat.sh
. ./common.sh
-function test_cat_basic {
+test_cat_basic() {
local testroot=`test_init cat_basic`
local commit_id=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
}
-function test_cat_path {
+test_cat_path() {
local testroot=`test_init cat_path`
local commit_id=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_cat_submodule {
+test_cat_submodule() {
local testroot=`test_init cat_submodule`
make_single_file_repo $testroot/repo2 foo
test_done "$testroot" "$ret"
}
-function test_cat_submodule_of_same_repo {
+test_cat_submodule_of_same_repo() {
local testroot=`test_init cat_submodule_of_same_repo`
local commit_id0=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_cat_symlink {
+test_cat_symlink() {
local testroot=`test_init cat_symlink`
local commit_id=`git_show_head $testroot/repo`
local author_time=`git_show_author_time $testroot/repo`
blob - d5bdc80feeb60dad0d9501ce585f7d9d48c67d75
blob + 5e018f600067c84e853f29b8bdc2f18470f40437
--- regress/cmdline/checkout.sh
+++ regress/cmdline/checkout.sh
. ./common.sh
-function test_checkout_basic {
+test_checkout_basic() {
local testroot=`test_init checkout_basic`
echo "A $testroot/wt/alpha" > $testroot/stdout.expected
test_done "$testroot" "$ret"
}
-function test_checkout_dir_exists {
+test_checkout_dir_exists() {
local testroot=`test_init checkout_dir_exists`
echo "A $testroot/wt/alpha" > $testroot/stdout.expected
test_done "$testroot" "$ret"
}
-function test_checkout_dir_not_empty {
+test_checkout_dir_not_empty() {
local testroot=`test_init checkout_dir_not_empty`
echo "A $testroot/wt/alpha" > $testroot/stdout.expected
}
-function test_checkout_sets_xbit {
+test_checkout_sets_xbit() {
local testroot=`test_init checkout_sets_xbit 1`
touch $testroot/repo/xfile
test_done "$testroot" "$ret"
}
-function test_checkout_commit_from_wrong_branch {
+test_checkout_commit_from_wrong_branch() {
local testroot=`test_init checkout_commit_from_wrong_branch`
(cd $testroot/repo && git checkout -q -b newbranch)
test_done "$testroot" "$ret"
}
-function test_checkout_tag {
+test_checkout_tag() {
local testroot=`test_init checkout_tag`
local tag="1.0.0"
test_done "$testroot" "$ret"
}
-function test_checkout_ignores_submodules {
+test_checkout_ignores_submodules() {
local testroot=`test_init checkout_ignores_submodules`
make_single_file_repo $testroot/repo2 foo
test_done "$testroot" "$ret"
}
-function test_checkout_read_only {
+test_checkout_read_only() {
local testroot=`test_init checkout_read_only`
# Make the repostiory read-only
test_done "$testroot" "$ret"
}
-function test_checkout_into_nonempty_dir {
+test_checkout_into_nonempty_dir() {
local testroot=`test_init checkout_into_nonempty_dir`
mkdir -p $testroot/wt
test_done "$testroot" "$ret"
}
-function test_checkout_symlink {
+test_checkout_symlink() {
local testroot=`test_init checkout_symlink`
(cd $testroot/repo && ln -s alpha alpha.link)
test_done "$testroot" "$ret"
}
-function test_checkout_symlink_relative_wtpath {
+test_checkout_symlink_relative_wtpath() {
local testroot=`test_init checkout_symlink_with_wtpath`
(cd $testroot/repo && ln -s alpha alpha.link)
blob - 9b76a9b02e1aa261139ca72cd49ed6c46c05de43
blob + 759292c28dbfd727a1e32e515a955160f6131b6b
--- regress/cmdline/cherrypick.sh
+++ regress/cmdline/cherrypick.sh
. ./common.sh
-function test_cherrypick_basic {
+test_cherrypick_basic() {
local testroot=`test_init cherrypick_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_cherrypick_root_commit {
+test_cherrypick_root_commit() {
local testroot=`test_init cherrypick_root_commit`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_cherrypick_into_work_tree_with_conflicts {
+test_cherrypick_into_work_tree_with_conflicts() {
local testroot=`test_init cherrypick_into_work_tree_with_conflicts`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_cherrypick_modified_submodule {
+test_cherrypick_modified_submodule() {
local testroot=`test_init cherrypick_modified_submodules`
make_single_file_repo $testroot/repo2 foo
test_done "$testroot" "$ret"
}
-function test_cherrypick_added_submodule {
+test_cherrypick_added_submodule() {
local testroot=`test_init cherrypick_added_submodules`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_cherrypick_conflict_wt_file_vs_repo_submodule {
+test_cherrypick_conflict_wt_file_vs_repo_submodule() {
local testroot=`test_init cherrypick_conflict_wt_file_vs_repo_submodule`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_cherrypick_modified_symlinks {
+test_cherrypick_modified_symlinks() {
local testroot=`test_init cherrypick_modified_symlinks`
(cd $testroot/repo && ln -s alpha alpha.link)
test_done "$testroot" "0"
}
-function test_cherrypick_symlink_conflicts {
+test_cherrypick_symlink_conflicts() {
local testroot=`test_init cherrypick_symlink_conflicts`
(cd $testroot/repo && ln -s alpha alpha.link)
test_done "$testroot" "0"
}
-function test_cherrypick_with_path_prefix_and_empty_tree {
+test_cherrypick_with_path_prefix_and_empty_tree() {
local testroot=`test_init cherrypick_with_path_prefix_and_empty_tree 1`
(cd $testroot/repo && git commit --allow-empty \
blob - 140179dfbd7c4ebb55a34d7a4bb4c53d7d6e615b
blob + 7ad2a2f1a59a577580c1f8c552f7c07b5cbd9b76
--- regress/cmdline/clone.sh
+++ regress/cmdline/clone.sh
. ./common.sh
-function test_clone_basic {
+test_clone_basic() {
local testroot=`test_init clone_basic`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_clone_list {
+test_clone_list() {
local testroot=`test_init clone_list`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_clone_branch {
+test_clone_branch() {
local testroot=`test_init clone_branch`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_clone_all {
+test_clone_all() {
local testroot=`test_init clone_all`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_clone_mirror {
+test_clone_mirror() {
local testroot=`test_init clone_mirror`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_clone_mirror_all {
+test_clone_mirror_all() {
local testroot=`test_init clone_mirror_all`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_clone_reference {
+test_clone_reference() {
local testroot=`test_init clone_reference`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_clone_branch_and_reference {
+test_clone_branch_and_reference() {
local testroot=`test_init clone_reference`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_clone_reference_mirror {
+test_clone_reference_mirror() {
local testroot=`test_init clone_reference_mirror`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
blob - 7e2e93f01cb45ae2344a72007a67db4942a023f5
blob + afd416223df26a16e6b2f6a618074947883e44e3
--- regress/cmdline/commit.sh
+++ regress/cmdline/commit.sh
. ./common.sh
-function test_commit_basic {
+test_commit_basic() {
local testroot=`test_init commit_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_new_subdir {
+test_commit_new_subdir() {
local testroot=`test_init commit_new_subdir`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_subdir {
+test_commit_subdir() {
local testroot=`test_init commit_subdir`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_single_file {
+test_commit_single_file() {
local testroot=`test_init commit_single_file`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_out_of_date {
+test_commit_out_of_date() {
local testroot=`test_init commit_out_of_date`
local first_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_commit_added_subdirs {
+test_commit_added_subdirs() {
local testroot=`test_init commit_added_subdirs`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_deleted_subdirs {
+test_commit_deleted_subdirs() {
local testroot=`test_init commit_deleted_subdirs`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_rejects_conflicted_file {
+test_commit_rejects_conflicted_file() {
local testroot=`test_init commit_rejects_conflicted_file`
local initial_rev=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_commit_single_file_multiple {
+test_commit_single_file_multiple() {
local testroot=`test_init commit_single_file_multiple`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "0"
}
-function test_commit_added_and_modified_in_same_dir {
+test_commit_added_and_modified_in_same_dir() {
local testroot=`test_init commit_added_and_modified_in_same_dir`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_path_prefix {
+test_commit_path_prefix() {
local testroot=`test_init commit_path_prefix`
local commit1=`git_show_head $testroot/repo`
return "$ret"
}
-function test_commit_dir_path {
+test_commit_dir_path() {
local testroot=`test_init commit_dir_path`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_selected_paths {
+test_commit_selected_paths() {
local testroot=`test_init commit_selected_paths`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_outside_refs_heads {
+test_commit_outside_refs_heads() {
local testroot=`test_init commit_outside_refs_heads`
got ref -r $testroot/repo -c master refs/remotes/origin/master
test_done "$testroot" "$ret"
}
-function test_commit_no_email {
+test_commit_no_email() {
local testroot=`test_init commit_no_email`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_tree_entry_sorting {
+test_commit_tree_entry_sorting() {
local testroot=`test_init commit_tree_entry_sorting`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_gotconfig_author {
+test_commit_gotconfig_author() {
local testroot=`test_init commit_gotconfig_author`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_gotconfig_worktree_author {
+test_commit_gotconfig_worktree_author() {
local testroot=`test_init commit_gotconfig_worktree_author`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_gitconfig_author {
+test_commit_gitconfig_author() {
local testroot=`test_init commit_gitconfig_author`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_xbit_change {
+test_commit_xbit_change() {
local testroot=`test_init commit_xbit_change`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function commit_check_mode {
+commit_check_mode() {
local mode="$1"
local expected_mode="$2"
return $ret
}
-function test_commit_normalizes_filemodes {
+test_commit_normalizes_filemodes() {
local testroot=`test_init commit_normalizes_filemodes`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_with_unrelated_submodule {
+test_commit_with_unrelated_submodule() {
local testroot=`test_init commit_with_unrelated_submodule`
make_single_file_repo $testroot/repo2 foo
test_done "$testroot" "$ret"
}
-function check_symlinks {
+check_symlinks() {
local wtpath="$1"
if ! [ -h $wtpath/alpha.link ]; then
echo "alpha.link is not a symlink"
return 0
}
-function test_commit_symlink {
+test_commit_symlink() {
local testroot=`test_init commit_symlink`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_commit_fix_bad_symlink {
+test_commit_fix_bad_symlink() {
local testroot=`test_init commit_fix_bad_symlink`
got checkout $testroot/repo $testroot/wt > /dev/null
blob - 17295f7a9ec3b7c9b92424f250ff997a36a7621d
blob + e95df3908f366957e8608730cd2dc49e62155ac0
--- regress/cmdline/common.sh
+++ regress/cmdline/common.sh
export MALLOC_OPTIONS=S
-function git_init
+git_init()
{
git init -q "$1"
}
-function maybe_pack_repo
+maybe_pack_repo()
{
local repo="$1"
if [ -n "$GOT_TEST_PACK" ]; then
fi
}
-function git_commit
+git_commit()
{
local repo="$1"
shift
maybe_pack_repo $repo
}
-function git_rm
+git_rm()
{
local repo="$1"
shift
(cd $repo && git rm -q "$@")
}
-function git_show_head
+git_show_head()
{
local repo="$1"
(cd $repo && git show --no-patch --pretty='format:%H')
}
-function git_show_branch_head
+git_show_branch_head()
{
local repo="$1"
local branch="$2"
}
-function git_show_author_time
+git_show_author_time()
{
local repo="$1"
local object="$2"
(cd $repo && git show --no-patch --pretty='format:%at' $object)
}
-function git_show_tagger_time
+git_show_tagger_time()
{
local repo="$1"
local tag="$2"
sed -e "s/^tagger $GOT_AUTHOR//" | cut -d' ' -f2)
}
-function git_show_parent_commit
+git_show_parent_commit()
{
local repo="$1"
local commit="$2"
(cd $repo && git show --no-patch --pretty='format:%P' $commit)
}
-function git_show_tree
+git_show_tree()
{
local repo="$1"
(cd $repo && git show --no-patch --pretty='format:%T')
}
-function trim_obj_id
+trim_obj_id()
{
let trimcount=$1
id=$2
echo ${id%$pat}
}
-function git_commit_tree
+git_commit_tree()
{
local repo="$1"
local msg="$2"
maybe_pack_repo $repo
}
-function make_test_tree
+make_test_tree()
{
repo="$1"
echo zeta > $repo/epsilon/zeta
}
-function make_single_file_repo
+make_single_file_repo()
{
repo="$1"
file="$2"
git_commit $repo -m "intialize $repo with file $file"
}
-function get_loose_object_path
+get_loose_object_path()
{
local repo="$1"
local id="$2"
echo "$repo/.git/objects/$id0/$idrest"
}
-function get_blob_id
+get_blob_id()
{
repo="$1"
tree_path="$2"
cut -d' ' -f 1
}
-function test_init
+test_init()
{
local testname="$1"
local no_tree="$2"
echo "$testroot"
}
-function test_cleanup
+test_cleanup()
{
local testroot="$1"
rm -rf "$testroot"
}
-function test_parseargs
+test_parseargs()
{
args=`getopt q $*`
if [ $? -ne 0 ]; then
done
}
-function run_test
+run_test()
{
testfunc="$1"
if [ -z "$GOT_TEST_QUIET" ]; then
$testfunc
}
-function test_done
+test_done()
{
local testroot="$1"
local result="$2"
blob - 5a961c237e6c8d29f6f6e6568d3dea3bd6b9036b
blob + 4c4531a4ae60dadd0d142ce72c1daa296710eefb
--- regress/cmdline/diff.sh
+++ regress/cmdline/diff.sh
. ./common.sh
-function test_diff_basic {
+test_diff_basic() {
local testroot=`test_init diff_basic`
local head_rev=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_diff_shows_conflict {
+test_diff_shows_conflict() {
local testroot=`test_init diff_shows_conflict 1`
echo "1" > $testroot/repo/numbers
test_done "$testroot" "$ret"
}
-function test_diff_tag {
+test_diff_tag() {
local testroot=`test_init diff_tag`
local commit_id0=`git_show_head $testroot/repo`
local tag1=1.0.0
test_done "$testroot" "$ret"
}
-function test_diff_lightweight_tag {
+test_diff_lightweight_tag() {
local testroot=`test_init diff_tag`
local commit_id0=`git_show_head $testroot/repo`
local tag1=1.0.0
test_done "$testroot" "$ret"
}
-function test_diff_ignore_whitespace {
+test_diff_ignore_whitespace() {
local testroot=`test_init diff_ignore_whitespace`
local commit_id0=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_diff_submodule_of_same_repo {
+test_diff_submodule_of_same_repo() {
local testroot=`test_init diff_submodule_of_same_repo`
(cd $testroot && git clone -q repo repo2 >/dev/null)
test_done "$testroot" "$ret"
}
-function test_diff_symlinks_in_work_tree {
+test_diff_symlinks_in_work_tree() {
local testroot=`test_init diff_symlinks_in_work_tree`
(cd $testroot/repo && ln -s alpha alpha.link)
test_done "$testroot" "$ret"
}
-function test_diff_symlinks_in_repo {
+test_diff_symlinks_in_repo() {
local testroot=`test_init diff_symlinks_in_repo`
(cd $testroot/repo && ln -s alpha alpha.link)
blob - a131768e455946cd8609feb790b2dd1a83b1644c
blob + 059c1dc9b29d8efbb092fcd4eaf3bbccc36da1c3
--- regress/cmdline/fetch.sh
+++ regress/cmdline/fetch.sh
. ./common.sh
-function test_fetch_basic {
+test_fetch_basic() {
local testroot=`test_init fetch_basic`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_fetch_list {
+test_fetch_list() {
local testroot=`test_init fetch_list`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_fetch_branch {
+test_fetch_branch() {
local testroot=`test_init fetch_branch`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_fetch_all {
+test_fetch_all() {
local testroot=`test_init fetch_all`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_fetch_empty_packfile {
+test_fetch_empty_packfile() {
local testroot=`test_init fetch_empty_packfile`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_fetch_delete_branch {
+test_fetch_delete_branch() {
local testroot=`test_init fetch_delete_branch`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
}
-function test_fetch_update_tag {
+test_fetch_update_tag() {
local testroot=`test_init fetch_update_tag`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_fetch_reference {
+test_fetch_reference() {
local testroot=`test_init fetch_reference`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
}
-function test_fetch_replace_symref {
+test_fetch_replace_symref() {
local testroot=`test_init fetch_replace_symref`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
}
-function test_fetch_update_headref {
+test_fetch_update_headref() {
local testroot=`test_init fetch_update_headref`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_fetch_headref_deleted_locally {
+test_fetch_headref_deleted_locally() {
local testroot=`test_init fetch_headref_deleted_locally`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_fetch_gotconfig_remote_repo {
+test_fetch_gotconfig_remote_repo() {
local testroot=`test_init fetch_gotconfig_remote_repo`
local testurl=ssh://127.0.0.1/$testroot
local commit_id=`git_show_head $testroot/repo`
blob - 5fe2eaa45ef687e1483d7805ee81a7cde2864933
blob + 75c501712bfeacfa0e4a1afe24ac2372d22f7cb6
--- regress/cmdline/histedit.sh
+++ regress/cmdline/histedit.sh
. ./common.sh
-function test_histedit_no_op {
+test_histedit_no_op() {
local testroot=`test_init histedit_no_op`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_swap {
+test_histedit_swap() {
local testroot=`test_init histedit_swap`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_drop {
+test_histedit_drop() {
local testroot=`test_init histedit_drop`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_fold {
+test_histedit_fold() {
local testroot=`test_init histedit_fold`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_edit {
+test_histedit_edit() {
local testroot=`test_init histedit_edit`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_fold_last_commit {
+test_histedit_fold_last_commit() {
local testroot=`test_init histedit_fold_last_commit`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_missing_commit {
+test_histedit_missing_commit() {
local testroot=`test_init histedit_missing_commit`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_abort {
+test_histedit_abort() {
local testroot=`test_init histedit_abort`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_path_prefix_drop {
+test_histedit_path_prefix_drop() {
local testroot=`test_init histedit_path_prefix_drop`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_path_prefix_edit {
+test_histedit_path_prefix_edit() {
local testroot=`test_init histedit_path_prefix_edit`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_outside_refs_heads {
+test_histedit_outside_refs_heads() {
local testroot=`test_init histedit_outside_refs_heads`
local commit1=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_fold_last_commit_swap {
+test_histedit_fold_last_commit_swap() {
local testroot=`test_init histedit_fold_last_commit_swap`
local orig_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_histedit_split_commit {
+test_histedit_split_commit() {
local testroot=`test_init histedit_split_commit`
local orig_commit=`git_show_head $testroot/repo`
}
-function test_histedit_duplicate_commit_in_script {
+test_histedit_duplicate_commit_in_script() {
local testroot=`test_init histedit_duplicate_commit_in_script`
local orig_commit=`git_show_head $testroot/repo`
blob - 032f4094ad0b07a6a2cad1d9f748feaa7b754c5f
blob + 6d8e522f63d95a3fa30f3656a34b5f91f348db45
--- regress/cmdline/import.sh
+++ regress/cmdline/import.sh
. ./common.sh
-function test_import_basic {
+test_import_basic() {
local testname=import_basic
local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX`
test_done "$testroot" "$ret"
}
-function test_import_requires_new_branch {
+test_import_requires_new_branch() {
local testroot=`test_init import_requires_new_branch`
mkdir $testroot/tree
}
-function test_import_ignores {
+test_import_ignores() {
local testname=import_ignores
local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX`
test_done "$testroot" "$ret"
}
-function test_import_empty_dir {
+test_import_empty_dir() {
local testname=import_empty_dir
local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX`
test_done "$testroot" "$ret"
}
-function test_import_symlink {
+test_import_symlink() {
local testname=import_symlink
local testroot=`mktemp -p /tmp -d got-test-$testname-XXXXXXXX`
blob - def5dd9574576b07bae2bb234b983b9c5e0881de
blob + 647ef6246e563eb70ba0369e986910cd0842ad52
--- regress/cmdline/integrate.sh
+++ regress/cmdline/integrate.sh
. ./common.sh
-function test_integrate_basic {
+test_integrate_basic() {
local testroot=`test_init integrate_basic`
(cd $testroot/repo && git checkout -q -b newbranch)
test_done "$testroot" "$ret"
}
-function test_integrate_requires_rebase_first {
+test_integrate_requires_rebase_first() {
local testroot=`test_init integrate_requires_rebase_first`
local init_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_integrate_path_prefix {
+test_integrate_path_prefix() {
local testroot=`test_init integrate_path_prefix`
(cd $testroot/repo && git checkout -q -b newbranch)
test_done "$testroot" "$ret"
}
-function test_integrate_backwards_in_time {
+test_integrate_backwards_in_time() {
local testroot=`test_init integrate_backwards_in_time`
(cd $testroot/repo && git checkout -q -b newbranch)
blob - 4bfea8b12107cc4df412fff424b5ca46162f5301
blob + 74ce60ea201a8a353667c2d1ef50a71807cd2377
--- regress/cmdline/log.sh
+++ regress/cmdline/log.sh
. ./common.sh
-function test_log_in_repo {
+test_log_in_repo() {
local testroot=`test_init log_in_repo`
local head_rev=`git_show_head $testroot/repo`
test_done "$testroot" "0"
}
-function test_log_in_bare_repo {
+test_log_in_bare_repo() {
local testroot=`test_init log_in_bare_repo`
local head_rev=`git_show_head $testroot/repo`
test_done "$testroot" "0"
}
-function test_log_in_worktree {
+test_log_in_worktree() {
local testroot=`test_init log_in_worktree 1`
make_test_tree $testroot/repo
test_done "$testroot" "0"
}
-function test_log_in_worktree_with_path_prefix {
+test_log_in_worktree_with_path_prefix() {
local testroot=`test_init log_in_prefixed_worktree`
local head_rev=`git_show_head $testroot/repo`
test_done "$testroot" "0"
}
-function test_log_tag {
+test_log_tag() {
local testroot=`test_init log_tag`
local commit_id=`git_show_head $testroot/repo`
local tag="1.0.0"
test_done "$testroot" "$ret"
}
-function test_log_limit {
+test_log_limit() {
local testroot=`test_init log_limit`
local commit_id0=`git_show_head $testroot/repo`
test_done "$testroot" "0"
}
-function test_log_patch_added_file {
+test_log_patch_added_file() {
local testroot=`test_init log_patch_added_file`
local commit_id0=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_log_nonexistent_path {
+test_log_nonexistent_path() {
local testroot=`test_init log_nonexistent_path`
local head_rev=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_log_end_at_commit {
+test_log_end_at_commit() {
local testroot=`test_init log_end_at_commit`
local commit_id0=`git_show_head $testroot/repo`
test_done "$testroot" "0"
}
-function test_log_reverse_display {
+test_log_reverse_display() {
local testroot=`test_init log_reverse_display`
local commit_id0=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_log_in_worktree_different_repo {
+test_log_in_worktree_different_repo() {
local testroot=`test_init log_in_worktree_different_repo 1`
make_test_tree $testroot/repo
test_done "$testroot" "0"
}
-function test_log_changed_paths {
+test_log_changed_paths() {
local testroot=`test_init log_changed_paths`
local commit_id0=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_log_submodule {
+test_log_submodule() {
local testroot=`test_init log_submodule`
make_single_file_repo $testroot/repo2 foo
blob - c8ab6b83177b18033b0454c81ce1d1e1dabaf0cd
blob + 6d48e72761668deed003b1cc1aaa9aa08f37a772
--- regress/cmdline/rebase.sh
+++ regress/cmdline/rebase.sh
. ./common.sh
-function test_rebase_basic {
+test_rebase_basic() {
local testroot=`test_init rebase_basic`
(cd $testroot/repo && git checkout -q -b newbranch)
test_done "$testroot" "$ret"
}
-function test_rebase_ancestry_check {
+test_rebase_ancestry_check() {
local testroot=`test_init rebase_ancestry_check`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_rebase_continue {
+test_rebase_continue() {
local testroot=`test_init rebase_continue`
local init_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_rebase_abort {
+test_rebase_abort() {
local testroot=`test_init rebase_abort`
local init_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_rebase_no_op_change {
+test_rebase_no_op_change() {
local testroot=`test_init rebase_no_op_change`
local init_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_rebase_in_progress {
+test_rebase_in_progress() {
local testroot=`test_init rebase_in_progress`
local init_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_rebase_path_prefix {
+test_rebase_path_prefix() {
local testroot=`test_init rebase_path_prefix`
(cd $testroot/repo && git checkout -q -b newbranch)
test_done "$testroot" "$ret"
}
-function test_rebase_preserves_logmsg {
+test_rebase_preserves_logmsg() {
local testroot=`test_init rebase_preserves_logmsg`
(cd $testroot/repo && git checkout -q -b newbranch)
test_done "$testroot" "$ret"
}
-function test_rebase_no_commits_to_rebase {
+test_rebase_no_commits_to_rebase() {
local testroot=`test_init rebase_no_commits_to_rebase`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_rebase_forward {
+test_rebase_forward() {
local testroot=`test_init rebase_forward`
local commit0=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_rebase_out_of_date {
+test_rebase_out_of_date() {
local testroot=`test_init rebase_out_of_date`
local initial_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_rebase_trims_empty_dir {
+test_rebase_trims_empty_dir() {
local testroot=`test_init rebase_trims_empty_dir`
(cd $testroot/repo && git checkout -q -b newbranch)
test_done "$testroot" "$ret"
}
-function test_rebase_delete_missing_file {
+test_rebase_delete_missing_file() {
local testroot=`test_init rebase_delete_missing_file`
mkdir -p $testroot/repo/d/f/g
test_done "$testroot" "$ret"
}
-function test_rebase_rm_add_rm_file {
+test_rebase_rm_add_rm_file() {
local testroot=`test_init rebase_rm_add_rm_file`
(cd $testroot/repo && git checkout -q -b newbranch)
blob - 6e27b4bc0e7f143ef67e0716e17fb03d6822ca2b
blob + 62f1dd6e5f84d9b1600f2331d03b9654474d14e1
--- regress/cmdline/ref.sh
+++ regress/cmdline/ref.sh
. ./common.sh
-function test_ref_create {
+test_ref_create() {
local testroot=`test_init ref_create`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_ref_delete {
+test_ref_delete() {
local testroot=`test_init ref_delete`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_ref_list {
+test_ref_list() {
local testroot=`test_init ref_list`
local commit_id=`git_show_head $testroot/repo`
blob - 94dd9d801d6d4e861e55b5e5dd9006b3aad573d4
blob + 30494f9d2fef5555baa42426a08a8e7d07fe854d
--- regress/cmdline/revert.sh
+++ regress/cmdline/revert.sh
. ./common.sh
-function test_revert_basic {
+test_revert_basic() {
local testroot=`test_init revert_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
}
-function test_revert_rm {
+test_revert_rm() {
local testroot=`test_init revert_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_revert_add {
+test_revert_add() {
local testroot=`test_init revert_add`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_revert_multiple {
+test_revert_multiple() {
local testroot=`test_init revert_multiple`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_revert_file_in_new_subdir {
+test_revert_file_in_new_subdir() {
local testroot=`test_init revert_file_in_new_subdir`
got checkout $testroot/repo $testroot/wt > /dev/null
}
-function test_revert_no_arguments {
+test_revert_no_arguments() {
local testroot=`test_init revert_no_arguments`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_revert_directory {
+test_revert_directory() {
local testroot=`test_init revert_directory`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_revert_directory_unknown {
+test_revert_directory_unknown() {
local testroot=`test_init revert_directory_unknown`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_revert_patch {
+test_revert_patch() {
local testroot=`test_init revert_patch`
jot 16 > $testroot/repo/numbers
test_done "$testroot" "$ret"
}
-function test_revert_patch_added {
+test_revert_patch_added() {
local testroot=`test_init revert_patch_added`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_revert_patch_removed {
+test_revert_patch_removed() {
local testroot=`test_init revert_patch_removed`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_revert_patch_one_change {
+test_revert_patch_one_change() {
local testroot=`test_init revert_patch_one_change`
jot 16 > $testroot/repo/numbers
test_done "$testroot" "$ret"
}
-function test_revert_added_subtree {
+test_revert_added_subtree() {
local testroot=`test_init revert_added_subtree`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_revert_deleted_subtree {
+test_revert_deleted_subtree() {
local testroot=`test_init revert_deleted_subtree`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_revert_symlink {
+test_revert_symlink() {
local testroot=`test_init revert_symlink`
(cd $testroot/repo && ln -s alpha alpha.link)
test_done "$testroot" "$ret"
}
-function test_revert_patch_symlink {
+test_revert_patch_symlink() {
local testroot=`test_init revert_patch_symlink`
(cd $testroot/repo && ln -s alpha alpha.link)
blob - e159de382cd06a0f707167bfb65330fac8ddc2be
blob + 149f0bdc3cc44d53a90d7d467740210e86263f89
--- regress/cmdline/rm.sh
+++ regress/cmdline/rm.sh
. ./common.sh
-function test_rm_basic {
+test_rm_basic() {
local testroot=`test_init rm_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "0"
}
-function test_rm_with_local_mods {
+test_rm_with_local_mods() {
local testroot=`test_init rm_with_local_mods`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_double_rm {
+test_double_rm() {
local testroot=`test_init double_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "0"
}
-function test_rm_and_add_elsewhere {
+test_rm_and_add_elsewhere() {
local testroot=`test_init rm_and_add_elsewhere`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_rm_directory {
+test_rm_directory() {
local testroot=`test_init rm_directory`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_rm_directory_keep_files {
+test_rm_directory_keep_files() {
local testroot=`test_init rm_directory_keep_files`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_rm_subtree {
+test_rm_subtree() {
local testroot=`test_init rm_subtree`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_rm_symlink {
+test_rm_symlink() {
local testroot=`test_init rm_symlink`
(cd $testroot/repo && ln -s alpha alpha.link)
test_done "$testroot" "$ret"
}
-function test_rm_status_code {
+test_rm_status_code() {
local testroot=`test_init rm_status_code`
got checkout $testroot/repo $testroot/wt > /dev/null
blob - 422f1280eb3c485ace7c573ea30c319bc53da677
blob + 4c63c9313c4b48595f5494758ae00d53b19995d2
--- regress/cmdline/stage.sh
+++ regress/cmdline/stage.sh
. ./common.sh
-function test_stage_basic {
+test_stage_basic() {
local testroot=`test_init stage_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_stage_no_changes {
+test_stage_no_changes() {
local testroot=`test_init stage_no_changes`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_stage_unversioned {
+test_stage_unversioned() {
local testroot=`test_init stage_unversioned`
got checkout $testroot/repo $testroot/wt > /dev/null
}
-function test_stage_nonexistent {
+test_stage_nonexistent() {
local testroot=`test_init stage_nonexistent`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_stage_list {
+test_stage_list() {
local testroot=`test_init stage_list`
got checkout $testroot/repo $testroot/wt > /dev/null
}
-function test_stage_conflict {
+test_stage_conflict() {
local testroot=`test_init stage_conflict`
local initial_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_stage_out_of_date {
+test_stage_out_of_date() {
local testroot=`test_init stage_out_of_date`
local initial_commit=`git_show_head $testroot/repo`
}
-function test_double_stage {
+test_double_stage() {
local testroot=`test_init double_stage`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_stage_status {
+test_stage_status() {
local testroot=`test_init stage_status`
got checkout $testroot/repo $testroot/wt > /dev/null
}
-function test_stage_add_already_staged_file {
+test_stage_add_already_staged_file() {
local testroot=`test_init stage_add_already_staged_file`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_stage_rm_already_staged_file {
+test_stage_rm_already_staged_file() {
local testroot=`test_init stage_rm_already_staged_file`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_stage_revert {
+test_stage_revert() {
local testroot=`test_init stage_revert`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_stage_diff {
+test_stage_diff() {
local testroot=`test_init stage_diff`
local head_commit=`git_show_head $testroot/repo`
}
-function test_stage_histedit {
+test_stage_histedit() {
local testroot=`test_init stage_histedit`
local orig_commit=`git_show_head $testroot/repo`
}
-function test_stage_rebase {
+test_stage_rebase() {
local testroot=`test_init stage_rebase`
(cd $testroot/repo && git checkout -q -b newbranch)
test_done "$testroot" "$ret"
}
-function test_stage_update {
+test_stage_update() {
local testroot=`test_init stage_update`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_stage_commit_non_staged {
+test_stage_commit_non_staged() {
local testroot=`test_init stage_commit_non_staged`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_stage_commit_out_of_date {
+test_stage_commit_out_of_date() {
local testroot=`test_init stage_commit_out_of_date`
got checkout $testroot/repo $testroot/wt > /dev/null
}
-function test_stage_commit {
+test_stage_commit() {
local testroot=`test_init stage_commit`
local first_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_stage_patch {
+test_stage_patch() {
local testroot=`test_init stage_patch`
jot 16 > $testroot/repo/numbers
test_done "$testroot" "$ret"
}
-function test_stage_patch_twice {
+test_stage_patch_twice() {
local testroot=`test_init stage_patch_twice`
jot 16 > $testroot/repo/numbers
test_done "$testroot" "$ret"
}
-function test_stage_patch_added {
+test_stage_patch_added() {
local testroot=`test_init stage_patch_added`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_stage_patch_added_twice {
+test_stage_patch_added_twice() {
local testroot=`test_init stage_patch_added_twice`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_stage_patch_removed {
+test_stage_patch_removed() {
local testroot=`test_init stage_patch_removed`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_stage_patch_removed_twice {
+test_stage_patch_removed_twice() {
local testroot=`test_init stage_patch_removed_twice`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_stage_patch_quit {
+test_stage_patch_quit() {
local testroot=`test_init stage_patch_quit`
jot 16 > $testroot/repo/numbers
}
-function test_stage_patch_incomplete_script {
+test_stage_patch_incomplete_script() {
local testroot=`test_init stage_incomplete_script`
jot 16 > $testroot/repo/numbers
}
-function test_stage_symlink {
+test_stage_symlink() {
local testroot=`test_init stage_symlink`
(cd $testroot/repo && ln -s alpha alpha.link)
test_done "$testroot" "0"
}
-function test_stage_patch_symlink {
+test_stage_patch_symlink() {
local testroot=`test_init stage_patch_symlink`
(cd $testroot/repo && ln -s alpha alpha.link)
blob - 46a185350db6563b65ec99ac16de6b202254c8ad
blob + 9aca32fad809caf8f50a0a3171c6f6ac997ce8ef
--- regress/cmdline/status.sh
+++ regress/cmdline/status.sh
. ./common.sh
-function test_status_basic {
+test_status_basic() {
local testroot=`test_init status_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_status_subdir_no_mods {
+test_status_subdir_no_mods() {
local testroot=`test_init status_subdir_no_mods 1`
mkdir $testroot/repo/Basic/
test_done "$testroot" "$ret"
}
-function test_status_subdir_no_mods2 {
+test_status_subdir_no_mods2() {
local testroot=`test_init status_subdir_no_mods2 1`
mkdir $testroot/repo/AST
test_done "$testroot" "$ret"
}
-function test_status_obstructed {
+test_status_obstructed() {
local testroot=`test_init status_obstructed`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_status_shows_local_mods_after_update {
+test_status_shows_local_mods_after_update() {
local testroot=`test_init status_shows_local_mods_after_update 1`
echo "1" > $testroot/repo/numbers
test_done "$testroot" "$ret"
}
-function test_status_unversioned_subdirs {
+test_status_unversioned_subdirs() {
local testroot=`test_init status_unversioned_subdirs 1`
mkdir $testroot/repo/cdfs/
test_done "$testroot" "$ret"
}
-function test_status_symlink {
+test_status_symlink() {
local testroot=`test_init status_symlink`
mkdir $testroot/repo/ramdisk/
test_done "$testroot" "$ret"
}
-function test_status_shows_no_mods_after_complete_merge {
+test_status_shows_no_mods_after_complete_merge() {
local testroot=`test_init status_shows_no_mods_after_complete_merge 1`
# make this file larger than the usual blob buffer size of 8192
test_done "$testroot" "$ret"
}
-function test_status_shows_conflict {
+test_status_shows_conflict() {
local testroot=`test_init status_shows_conflict 1`
echo "1" > $testroot/repo/numbers
test_done "$testroot" "$ret"
}
-function test_status_empty_dir {
+test_status_empty_dir() {
local testroot=`test_init status_empty_dir`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_status_empty_dir_unversioned_file {
+test_status_empty_dir_unversioned_file() {
local testroot=`test_init status_empty_dir_unversioned_file`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_status_many_paths {
+test_status_many_paths() {
local testroot=`test_init status_many_paths`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_status_cvsignore {
+test_status_cvsignore() {
local testroot=`test_init status_cvsignore`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_status_gitignore {
+test_status_gitignore() {
local testroot=`test_init status_gitignore`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_status_status_code {
+test_status_status_code() {
local testroot=`test_init status_status_code`
got checkout $testroot/repo $testroot/wt > /dev/null
blob - 4ce096b6db3b19b619126275835da465fe879e84
blob + 98ded056d8e75ba6c4fdd00c6d079d1c469e4a17
--- regress/cmdline/tag.sh
+++ regress/cmdline/tag.sh
. ./common.sh
-function test_tag_create {
+test_tag_create() {
local testroot=`test_init tag_create`
local commit_id=`git_show_head $testroot/repo`
local tag=1.0.0
test_done "$testroot" "$ret"
}
-function test_tag_list {
+test_tag_list() {
local testroot=`test_init tag_list`
local commit_id=`git_show_head $testroot/repo`
local tag=1.0.0
test_done "$testroot" "$ret"
}
-function test_tag_list_lightweight {
+test_tag_list_lightweight() {
local testroot=`test_init tag_list_lightweight`
local commit_id=`git_show_head $testroot/repo`
local tag=1.0.0
blob - 89a7c5142490b45ef7d5bceba771f8355f633f4d
blob + 68b58e3ee50007e8b30b983b92b7e2536cb39a20
--- regress/cmdline/tree.sh
+++ regress/cmdline/tree.sh
. ./common.sh
-function test_tree_basic {
+test_tree_basic() {
local testroot=`test_init tree_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_tree_branch {
+test_tree_branch() {
local testroot=`test_init tree_branch`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_tree_submodule {
+test_tree_submodule() {
local testroot=`test_init tree_submodule`
make_single_file_repo $testroot/repo2 foo
test_done "$testroot" "$ret"
}
-function test_tree_submodule_of_same_repo {
+test_tree_submodule_of_same_repo() {
local testroot=`test_init tree_submodule_of_same_repo`
(cd $testroot && git clone -q repo repo2 >/dev/null)
blob - 6ab66e9c9cebc3388c960434cc6e013aa32c4b8b
blob + 6b88ae02ec91ba9a708d70c67ddc62cdcfe66a03
--- regress/cmdline/unstage.sh
+++ regress/cmdline/unstage.sh
. ./common.sh
-function test_unstage_basic {
+test_unstage_basic() {
local testroot=`test_init unstage_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_unstage_unversioned {
+test_unstage_unversioned() {
local testroot=`test_init unstage_unversioned`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_unstage_nonexistent {
+test_unstage_nonexistent() {
local testroot=`test_init unstage_nonexistent`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_unstage_patch {
+test_unstage_patch() {
local testroot=`test_init unstage_patch`
jot 16 > $testroot/repo/numbers
}
-function test_unstage_patch_added {
+test_unstage_patch_added() {
local testroot=`test_init unstage_patch_added`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_unstage_patch_removed {
+test_unstage_patch_removed() {
local testroot=`test_init unstage_patch_removed`
local commit_id=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_unstage_patch_quit {
+test_unstage_patch_quit() {
local testroot=`test_init unstage_patch_quit`
jot 16 > $testroot/repo/numbers
test_done "$testroot" "$ret"
}
-function test_unstage_symlink {
+test_unstage_symlink() {
local testroot=`test_init unstage_symlink`
(cd $testroot/repo && ln -s alpha alpha.link)
test_done "$testroot" "0"
}
-function test_unstage_patch_symlink {
+test_unstage_patch_symlink() {
local testroot=`test_init unstage_patch_symlink`
(cd $testroot/repo && ln -s alpha alpha.link)
blob - 217f592b094a74dd27b41d9bb21f09b3a3931a0e
blob + 01cca03963ab7106310fd5a83a41dcce92cfe2d2
--- regress/cmdline/update.sh
+++ regress/cmdline/update.sh
. ./common.sh
-function test_update_basic {
+test_update_basic() {
local testroot=`test_init update_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_adds_file {
+test_update_adds_file() {
local testroot=`test_init update_adds_file`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_deletes_file {
+test_update_deletes_file() {
local testroot=`test_init update_deletes_file`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "0"
}
-function test_update_deletes_dir {
+test_update_deletes_dir() {
local testroot=`test_init update_deletes_dir`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "0"
}
-function test_update_deletes_dir_with_path_prefix {
+test_update_deletes_dir_with_path_prefix() {
local testroot=`test_init update_deletes_dir_with_path_prefix`
local first_rev=`git_show_head $testroot/repo`
test_done "$testroot" "0"
}
-function test_update_deletes_dir_recursively {
+test_update_deletes_dir_recursively() {
local testroot=`test_init update_deletes_dir_recursively`
local first_rev=`git_show_head $testroot/repo`
test_done "$testroot" "0"
}
-function test_update_sibling_dirs_with_common_prefix {
+test_update_sibling_dirs_with_common_prefix() {
local testroot=`test_init update_sibling_dirs_with_common_prefix`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_dir_with_dot_sibling {
+test_update_dir_with_dot_sibling() {
local testroot=`test_init update_dir_with_dot_sibling`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_moves_files_upwards {
+test_update_moves_files_upwards() {
local testroot=`test_init update_moves_files_upwards`
mkdir $testroot/repo/epsilon/psi
test_done "$testroot" "0"
}
-function test_update_moves_files_to_new_dir {
+test_update_moves_files_to_new_dir() {
local testroot=`test_init update_moves_files_to_new_dir`
mkdir $testroot/repo/epsilon/psi
test_done "$testroot" "0"
}
-function test_update_creates_missing_parent {
+test_update_creates_missing_parent() {
local testroot=`test_init update_creates_missing_parent 1`
touch $testroot/repo/Makefile
test_done "$testroot" "$ret"
}
-function test_update_creates_missing_parent_with_subdir {
+test_update_creates_missing_parent_with_subdir() {
local testroot=`test_init update_creates_missing_parent_with_subdir 1`
touch $testroot/repo/Makefile
test_done "$testroot" "0"
}
-function test_update_file_in_subsubdir {
+test_update_file_in_subsubdir() {
local testroot=`test_init update_fle_in_subsubdir 1`
touch $testroot/repo/Makefile
test_done "$testroot" "0"
}
-function test_update_merges_file_edits {
+test_update_merges_file_edits() {
local testroot=`test_init update_merges_file_edits`
echo "1" > $testroot/repo/numbers
test_done "$testroot" "$ret"
}
-function test_update_keeps_xbit {
+test_update_keeps_xbit() {
local testroot=`test_init update_keeps_xbit 1`
touch $testroot/repo/xfile
test_done "$testroot" "$ret"
}
-function test_update_clears_xbit {
+test_update_clears_xbit() {
local testroot=`test_init update_clears_xbit 1`
touch $testroot/repo/xfile
test_done "$testroot" "$ret"
}
-function test_update_restores_missing_file {
+test_update_restores_missing_file() {
local testroot=`test_init update_restores_missing_file`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_conflict_wt_add_vs_repo_add {
+test_update_conflict_wt_add_vs_repo_add() {
local testroot=`test_init update_conflict_wt_add_vs_repo_add`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_conflict_wt_edit_vs_repo_rm {
+test_update_conflict_wt_edit_vs_repo_rm() {
local testroot=`test_init update_conflict_wt_edit_vs_repo_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_conflict_wt_rm_vs_repo_edit {
+test_update_conflict_wt_rm_vs_repo_edit() {
local testroot=`test_init update_conflict_wt_rm_vs_repo_edit`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_conflict_wt_rm_vs_repo_rm {
+test_update_conflict_wt_rm_vs_repo_rm() {
local testroot=`test_init update_conflict_wt_rm_vs_repo_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "0"
}
-function test_update_partial {
+test_update_partial() {
local testroot=`test_init update_partial`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_partial_add {
+test_update_partial_add() {
local testroot=`test_init update_partial_add`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_partial_rm {
+test_update_partial_rm() {
local testroot=`test_init update_partial_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_partial_dir {
+test_update_partial_dir() {
local testroot=`test_init update_partial_dir`
got checkout $testroot/repo $testroot/wt > /dev/null
}
-function test_update_moved_branch_ref {
+test_update_moved_branch_ref() {
local testroot=`test_init update_moved_branch_ref`
git clone -q --mirror $testroot/repo $testroot/repo2
test_done "$testroot" "$ret"
}
-function test_update_to_another_branch {
+test_update_to_another_branch() {
local testroot=`test_init update_to_another_branch`
local base_commit=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_update_to_commit_on_wrong_branch {
+test_update_to_commit_on_wrong_branch() {
local testroot=`test_init update_to_commit_on_wrong_branch`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_bumps_base_commit_id {
+test_update_bumps_base_commit_id() {
local testroot=`test_init update_bumps_base_commit_id`
echo "psi" > $testroot/repo/epsilon/psi
test_done "$testroot" "$ret"
}
-function test_update_tag {
+test_update_tag() {
local testroot=`test_init update_tag`
local tag="1.0.0"
test_done "$testroot" "$ret"
}
-function test_update_toggles_xbit {
+test_update_toggles_xbit() {
local testroot=`test_init update_toggles_xbit 1`
touch $testroot/repo/xfile
test_done "$testroot" "$ret"
}
-function test_update_preserves_conflicted_file {
+test_update_preserves_conflicted_file() {
local testroot=`test_init update_preserves_conflicted_file`
local commit_id0=`git_show_head $testroot/repo`
test_done "$testroot" "$ret"
}
-function test_update_modified_submodules {
+test_update_modified_submodules() {
local testroot=`test_init update_modified_submodules`
make_single_file_repo $testroot/repo2 foo
test_done "$testroot" "$ret"
}
-function test_update_adds_submodule {
+test_update_adds_submodule() {
local testroot=`test_init update_adds_submodule`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_conflict_wt_file_vs_repo_submodule {
+test_update_conflict_wt_file_vs_repo_submodule() {
local testroot=`test_init update_conflict_wt_file_vs_repo_submodule`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_adds_symlink {
+test_update_adds_symlink() {
local testroot=`test_init update_adds_symlink`
got checkout $testroot/repo $testroot/wt > /dev/null
test_done "$testroot" "$ret"
}
-function test_update_deletes_symlink {
+test_update_deletes_symlink() {
local testroot=`test_init update_deletes_symlink`
(cd $testroot/repo && ln -s alpha alpha.link)
test_done "$testroot" "0"
}
-function test_update_symlink_conflicts {
+test_update_symlink_conflicts() {
local testroot=`test_init update_symlink_conflicts`
(cd $testroot/repo && ln -s alpha alpha.link)