From 11199f0176ab4e84d1f231e60dee3222b4f0f971 Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Tue, 20 Mar 2018 20:37:02 -0400 Subject: [PATCH] test: add setup_local_branch_with_space to migrate fixtures --- test/test-migrate-fixtures.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/test-migrate-fixtures.sh b/test/test-migrate-fixtures.sh index e461279c..9be71f4d 100755 --- a/test/test-migrate-fixtures.sh +++ b/test/test-migrate-fixtures.sh @@ -79,6 +79,27 @@ setup_multiple_local_branches() { git checkout master } +# setup_local_branch_with_space creates a repository as follows: +# +# A +# \ +# refs/heads/master +# +# - Commit 'A' has 50 bytes in a file named "a file.txt". +setup_local_branch_with_space() { + set -e + + reponame="migrate-local-branch-with-space" + filename="a file.txt" + + remove_and_create_local_repo "$reponame" + + base64 < /dev/urandom | head -c 50 > "$filename" + + git add "$filename" + git commit -m "initial commit" +} + # setup_single_remote_branch creates a repository as follows: # # A---B