diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-11 15:43:56 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-11 15:43:56 +1000 |
commit | 2c140445e5a014e60e12467ee70a80eaea041ff4 (patch) | |
tree | 6a820eb68e454d6f7a2bf29ee014e3b6cfa6dd86 /test | |
parent | bfa47d3b91d930697d3c6318bfc29f171475b543 (diff) | |
parent | 62a231abb78db5f807ff55ad77f39bcf633539b2 (diff) |
Merge branch 'master' into feature/deleting-branches
Diffstat (limited to 'test')
-rwxr-xr-x | test/lots_of_commits.sh | 30 | ||||
-rwxr-xr-x | test/merge_conflict.sh (renamed from test/generate_basic_repo.sh) | 2 | ||||
-rwxr-xr-x | test/unicode_characters.sh | 35 |
3 files changed, 66 insertions, 1 deletions
diff --git a/test/lots_of_commits.sh b/test/lots_of_commits.sh new file mode 100755 index 000000000..6a92d32e2 --- /dev/null +++ b/test/lots_of_commits.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# this script makes a repo with lots of commits + +# call this command from the test directory: +# ./lots_of_commits.sh; cd testrepo; gg; cd .. + +# -e means exit if something fails +# -x means print out simple commands before running them +set -ex + +reponame="testrepo" + +rm -rf ${reponame} +mkdir ${reponame} +cd ${reponame} + +git init + +i=2 +end=100 +while [ $i -le $end ]; do + echo "file${i}" > file${i} + git add file${i} + git commit -m file${i} + + i=$(($i+1)) +done + +echo "unstaged change" > file100 diff --git a/test/generate_basic_repo.sh b/test/merge_conflict.sh index ef04333c7..9bd12bf56 100755 --- a/test/generate_basic_repo.sh +++ b/test/merge_conflict.sh @@ -4,7 +4,7 @@ # on the master branch and if we try and merge master we get a merge conflict # call this command from the test directory: -# ./generate_basic_repo.sh; cd testrepo; gg; cd .. +# ./merge_conflict.sh; cd testrepo; gg; cd .. # -e means exit if something fails # -x means print out simple commands before running them diff --git a/test/unicode_characters.sh b/test/unicode_characters.sh new file mode 100755 index 000000000..92640d52f --- /dev/null +++ b/test/unicode_characters.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# this script will make a repo with a master and develop branch, where we end up +# on the master branch and if we try and merge master we get a merge conflict + +# call this command from the test directory: +# ./generate_basic_repo.sh; cd testrepo; gg; cd .. + +# -e means exit if something fails +# -x means print out simple commands before running them +set -ex + +reponame="testrepo" + +rm -rf ${reponame} +mkdir ${reponame} +cd ${reponame} + +git init + +# Add some ansi, unicode, zero width joiner caracters +cat <<EOT >> charstest.txt +ANSI Œ (U+0152 Œ Latin capital ligature OE Latin Extended-A) + ¥ (0xA5 U+00A5 ¥ yes sign) + ƒ (0x83 U+0192 ƒ Latin small letter f with hook) +ZWJ https://en.wikipedia.org/wiki/Zero-width_joiner / https://unicode.org/Public/emoji/4.0/emoji-zwj-sequences.txt 👶(👨👦) +UNICODE ☆ 🤓 え 术 +EOT +git add charstest.txt +git commit -m "Test chars Œ¥ƒ👶👨👦☆ 🤓 え 术 commit" +echo "我喜歡編碼" >> charstest.txt +echo "நான் குறியீடு விரும்புகிறேன்" >> charstest.txt +git add charstest.txt +git commit -m "Test chars 我喜歡編碼 நான் குறியீடு விரும்புகிறேன் commit" + |