diff options
author | Jens Pfeifle <jens.pfeifle@rommelag.com> | 2022-05-07 16:06:27 +0200 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-05-08 13:29:57 +1000 |
commit | 1e08b90f67f841958501a53f097c21c4b9864769 (patch) | |
tree | 4614d7b9d431b2dcf2fd0a7375f514cdb49b5cfe /test | |
parent | 7ac487545c5ddc5605f001bb3cecd3da6732ee4a (diff) |
Add integration test for reset author command.
Diffstat (limited to 'test')
22 files changed, 54 insertions, 0 deletions
diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/resetAuthor/expected/repo/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..f4b7a0e26 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +myfile2 diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/FETCH_HEAD b/test/integration/resetAuthor/expected/repo/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/FETCH_HEAD diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/HEAD b/test/integration/resetAuthor/expected/repo/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/config b/test/integration/resetAuthor/expected/repo/.git_keep/config new file mode 100644 index 000000000..85e571409 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/config @@ -0,0 +1,10 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = Author2@example.com + name = Author2 diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/description b/test/integration/resetAuthor/expected/repo/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/index b/test/integration/resetAuthor/expected/repo/.git_keep/index Binary files differnew file mode 100644 index 000000000..d28ffa71e --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/index diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/info/exclude b/test/integration/resetAuthor/expected/repo/.git_keep/info/exclude new file mode 100644 index 000000000..a5196d1be --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/logs/HEAD b/test/integration/resetAuthor/expected/repo/.git_keep/logs/HEAD new file mode 100644 index 000000000..882fa7c0e --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/logs/HEAD @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 291bcc7e708303b395f52245ec988ddbc985bae3 Author1 <Author1@example.com> 1651932821 +0200 commit (initial): myfile1 +291bcc7e708303b395f52245ec988ddbc985bae3 63aff3f0f54955ea149f9c2f3c07697b8864940d Author1 <Author1@example.com> 1651932821 +0200 commit: myfile2 +63aff3f0f54955ea149f9c2f3c07697b8864940d 0714eb875f11c56a2dc8c53c148889fe43602349 Author2 <Author2@example.com> 1651932824 +0200 commit (amend): myfile2 diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/resetAuthor/expected/repo/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..882fa7c0e --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/logs/refs/heads/master @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 291bcc7e708303b395f52245ec988ddbc985bae3 Author1 <Author1@example.com> 1651932821 +0200 commit (initial): myfile1 +291bcc7e708303b395f52245ec988ddbc985bae3 63aff3f0f54955ea149f9c2f3c07697b8864940d Author1 <Author1@example.com> 1651932821 +0200 commit: myfile2 +63aff3f0f54955ea149f9c2f3c07697b8864940d 0714eb875f11c56a2dc8c53c148889fe43602349 Author2 <Author2@example.com> 1651932824 +0200 commit (amend): myfile2 diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/objects/07/14eb875f11c56a2dc8c53c148889fe43602349 b/test/integration/resetAuthor/expected/repo/.git_keep/objects/07/14eb875f11c56a2dc8c53c148889fe43602349 Binary files differnew file mode 100644 index 000000000..c355bd74a --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/objects/07/14eb875f11c56a2dc8c53c148889fe43602349 diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/resetAuthor/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 Binary files differnew file mode 100644 index 000000000..7f2ebf4ee --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/resetAuthor/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 Binary files differnew file mode 100644 index 000000000..f74bf2335 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/objects/29/1bcc7e708303b395f52245ec988ddbc985bae3 b/test/integration/resetAuthor/expected/repo/.git_keep/objects/29/1bcc7e708303b395f52245ec988ddbc985bae3 new file mode 100644 index 000000000..a351f8296 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/objects/29/1bcc7e708303b395f52245ec988ddbc985bae3 @@ -0,0 +1,2 @@ +xQ +0D)_lݦ G&,tz{xfx0oR5[ S4kDs X&ZhLE<۽pW{lzJ.];<>x:wM:{uSt5'
\ No newline at end of file diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/objects/63/aff3f0f54955ea149f9c2f3c07697b8864940d b/test/integration/resetAuthor/expected/repo/.git_keep/objects/63/aff3f0f54955ea149f9c2f3c07697b8864940d new file mode 100644 index 000000000..3d713469f --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/objects/63/aff3f0f54955ea149f9c2f3c07697b8864940d @@ -0,0 +1,2 @@ +xK +1]$=iѣ3xP5;]D:)E2Dd*: ]#dH9O2`M}KJI>E*>}\۶)<ŀQc">dB
\ No newline at end of file diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/resetAuthor/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 Binary files differnew file mode 100644 index 000000000..285df3e5f --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/resetAuthor/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 Binary files differnew file mode 100644 index 000000000..96d2e71a6 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 diff --git a/test/integration/resetAuthor/expected/repo/.git_keep/refs/heads/master b/test/integration/resetAuthor/expected/repo/.git_keep/refs/heads/master new file mode 100644 index 000000000..73d857f01 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/.git_keep/refs/heads/master @@ -0,0 +1 @@ +0714eb875f11c56a2dc8c53c148889fe43602349 diff --git a/test/integration/resetAuthor/expected/repo/myfile1 b/test/integration/resetAuthor/expected/repo/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/resetAuthor/expected/repo/myfile2 b/test/integration/resetAuthor/expected/repo/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/resetAuthor/expected/repo/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/resetAuthor/recording.json b/test/integration/resetAuthor/recording.json new file mode 100644 index 000000000..40a1552ac --- /dev/null +++ b/test/integration/resetAuthor/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":638,"Mod":0,"Key":256,"Ch":52},{"Timestamp":1406,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2584,"Mod":0,"Key":256,"Ch":121},{"Timestamp":5654,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":117,"Height":83}]}
\ No newline at end of file diff --git a/test/integration/resetAuthor/setup.sh b/test/integration/resetAuthor/setup.sh new file mode 100644 index 000000000..a521883c1 --- /dev/null +++ b/test/integration/resetAuthor/setup.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +cd $1 + +git init + +git config user.email "Author1@example.com" +git config user.name "Author1" + +echo test1 > myfile1 +git add . +git commit -am "myfile1" +echo test2 > myfile2 +git add . +git commit -am "myfile2" + +git config user.email "Author2@example.com" +git config user.name "Author2" diff --git a/test/integration/resetAuthor/test.json b/test/integration/resetAuthor/test.json new file mode 100644 index 000000000..8e14c4d8e --- /dev/null +++ b/test/integration/resetAuthor/test.json @@ -0,0 +1 @@ +{ "description": "In this test the author of a commit is reset to a different name/email.", "speed": 5 } |