From b40190bd945abf98446a618b503dd6e985242784 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 20 Dec 2022 22:18:26 +1100 Subject: [PATCH] add multi-line commit integration test --- pkg/integration/components/assert.go | 11 ++++++ .../tests/commit/commit_multiline.go | 34 ++++++++++++++++++ pkg/integration/tests/tests.go | 1 + .../expected/repo/.git_keep/index | Bin 425 -> 0 bytes .../expected/repo/.git_keep/logs/HEAD | 5 --- .../repo/.git_keep/logs/refs/heads/master | 5 --- .../0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 | Bin 52 -> 0 bytes .../17/6069f0ded1db43eecb3b629a6077dba6c68295 | 2 -- .../18/0cf8328022becee9aaa2577a8f84ea2b9f3827 | Bin 21 -> 0 bytes .../2b/173c861df433fa43ffad13f80c8b312c5c8bce | Bin 103 -> 0 bytes .../2f/6174050380438f14b16658a356e762435ca591 | Bin 128 -> 0 bytes .../30/a1ca3481fdec3245b02aeacfb72ddfe2a433be | Bin 154 -> 0 bytes .../37/128a3020849daa0847462d14c384cc74c42ae0 | Bin 149 -> 0 bytes .../39/33a268c502712421b7bfa04888319d6f108574 | Bin 149 -> 0 bytes .../4f/346f1ad5ba2917da2109e2eaa2f2dfbb86f10f | Bin 21 -> 0 bytes .../57/4013716a7f007a27b647b90cdbc78d006d792b | 2 -- .../9f/1b5440546da24daad7014ccf3e1f4d81f9414b | Bin 148 -> 0 bytes .../a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 | Bin 21 -> 0 bytes .../a7/341a59f0ddeef969e69fb6368266d22b0f2416 | Bin 77 -> 0 bytes .../d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 | Bin 21 -> 0 bytes .../df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b | Bin 21 -> 0 bytes .../expected/repo/.git_keep/refs/heads/master | 1 - .../commitMultiline/expected/repo/myfile1 | 1 - .../commitMultiline/expected/repo/myfile2 | 1 - .../commitMultiline/expected/repo/myfile3 | 1 - .../commitMultiline/expected/repo/myfile4 | 1 - .../commitMultiline/expected/repo/myfile5 | 1 - .../commitMultiline/recording.json | 1 - test/integration/commitMultiline/setup.sh | 24 ------------- test/integration/commitMultiline/test.json | 4 --- .../expected/repo/.git_keep/COMMIT_EDITMSG | 0 .../expected/repo/.git_keep/FETCH_HEAD | 0 .../expected/repo/.git_keep/HEAD | 0 .../expected/repo/.git_keep/config | 4 +++ .../expected/repo/.git_keep/description | 0 .../expected/repo/.git_keep/index | Bin 0 -> 137 bytes .../expected/repo/.git_keep/info/exclude | 0 .../expected/repo/.git_keep/logs/HEAD | 1 + .../repo/.git_keep/logs/refs/heads/master | 1 + .../0c/4369dfc55cd41da90e149f2fa8ee3fc0a8f297 | Bin 0 -> 51 bytes .../ad/a5661567ddf0a64f589cad3cd0cffd7e79af99 | Bin 0 -> 30 bytes .../f5/b4b9b810f0c3d13754db99d24b04de451f8cec | Bin 0 -> 128 bytes .../expected/repo/.git_keep/refs/heads/master | 1 + .../commit_multiline/expected/repo/myfile | 1 + 44 files changed, 54 insertions(+), 49 deletions(-) create mode 100644 pkg/integration/tests/commit/commit_multiline.go delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/index delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/logs/HEAD delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/logs/refs/heads/master delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/17/6069f0ded1db43eecb3b629a6077dba6c68295 delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/30/a1ca3481fdec3245b02aeacfb72ddfe2a433be delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/37/128a3020849daa0847462d14c384cc74c42ae0 delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/39/33a268c502712421b7bfa04888319d6f108574 delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/4f/346f1ad5ba2917da2109e2eaa2f2dfbb86f10f delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/57/4013716a7f007a27b647b90cdbc78d006d792b delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/9f/1b5440546da24daad7014ccf3e1f4d81f9414b delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b delete mode 100644 test/integration/commitMultiline/expected/repo/.git_keep/refs/heads/master delete mode 100644 test/integration/commitMultiline/expected/repo/myfile1 delete mode 100644 test/integration/commitMultiline/expected/repo/myfile2 delete mode 100644 test/integration/commitMultiline/expected/repo/myfile3 delete mode 100644 test/integration/commitMultiline/expected/repo/myfile4 delete mode 100644 test/integration/commitMultiline/expected/repo/myfile5 delete mode 100644 test/integration/commitMultiline/recording.json delete mode 100644 test/integration/commitMultiline/setup.sh delete mode 100644 test/integration/commitMultiline/test.json rename test/{integration/commitMultiline => integration_new/commit/commit_multiline}/expected/repo/.git_keep/COMMIT_EDITMSG (100%) rename test/{integration/commitMultiline => integration_new/commit/commit_multiline}/expected/repo/.git_keep/FETCH_HEAD (100%) rename test/{integration/commitMultiline => integration_new/commit/commit_multiline}/expected/repo/.git_keep/HEAD (100%) rename test/{integration/commitMultiline => integration_new/commit/commit_multiline}/expected/repo/.git_keep/config (74%) rename test/{integration/commitMultiline => integration_new/commit/commit_multiline}/expected/repo/.git_keep/description (100%) create mode 100644 test/integration_new/commit/commit_multiline/expected/repo/.git_keep/index rename test/{integration/commitMultiline => integration_new/commit/commit_multiline}/expected/repo/.git_keep/info/exclude (100%) create mode 100644 test/integration_new/commit/commit_multiline/expected/repo/.git_keep/logs/HEAD create mode 100644 test/integration_new/commit/commit_multiline/expected/repo/.git_keep/logs/refs/heads/master create mode 100644 test/integration_new/commit/commit_multiline/expected/repo/.git_keep/objects/0c/4369dfc55cd41da90e149f2fa8ee3fc0a8f297 create mode 100644 test/integration_new/commit/commit_multiline/expected/repo/.git_keep/objects/ad/a5661567ddf0a64f589cad3cd0cffd7e79af99 create mode 100644 test/integration_new/commit/commit_multiline/expected/repo/.git_keep/objects/f5/b4b9b810f0c3d13754db99d24b04de451f8cec create mode 100644 test/integration_new/commit/commit_multiline/expected/repo/.git_keep/refs/heads/master create mode 100644 test/integration_new/commit/commit_multiline/expected/repo/myfile diff --git a/pkg/integration/components/assert.go b/pkg/integration/components/assert.go index c911dbefa..3ce842ebf 100644 --- a/pkg/integration/components/assert.go +++ b/pkg/integration/components/assert.go @@ -2,6 +2,7 @@ package components import ( "fmt" + "regexp" "strings" "time" @@ -56,6 +57,16 @@ func NotContains(target string) *matcher { }} } +func MatchesRegexp(regexStr string) *matcher { + return &matcher{testFn: func(value string) (bool, string) { + matched, err := regexp.MatchString(regexStr, value) + if err != nil { + return false, fmt.Sprintf("Unexpected error parsing regular expression '%s': %s", regexStr, err.Error()) + } + return matched, fmt.Sprintf("Expected '%s' to match regular expression '%s'", value, regexStr) + }} +} + func Equals(target string) *matcher { return &matcher{testFn: func(value string) (bool, string) { return target == value, fmt.Sprintf("Expected '%s' to equal '%s'", value, target) diff --git a/pkg/integration/tests/commit/commit_multiline.go b/pkg/integration/tests/commit/commit_multiline.go new file mode 100644 index 000000000..f6472dd33 --- /dev/null +++ b/pkg/integration/tests/commit/commit_multiline.go @@ -0,0 +1,34 @@ +package commit + +import ( + "github.com/jesseduffield/lazygit/pkg/config" + . "github.com/jesseduffield/lazygit/pkg/integration/components" +) + +var CommitMultiline = NewIntegrationTest(NewIntegrationTestArgs{ + Description: "Commit with a multi-line commit message", + ExtraCmdArgs: "", + Skip: false, + SetupConfig: func(config *config.AppConfig) {}, + SetupRepo: func(shell *Shell) { + shell.CreateFile("myfile", "myfile content") + }, + Run: func(shell *Shell, input *Input, assert *Assert, keys config.KeybindingConfig) { + assert.CommitCount(0) + + input.PrimaryAction() + input.PressKeys(keys.Files.CommitChanges) + + input.Type("first line") + input.PressKeys(keys.Universal.AppendNewline) + input.PressKeys(keys.Universal.AppendNewline) + input.Type("third line") + input.Confirm() + + assert.CommitCount(1) + assert.MatchHeadCommitMessage(Equals("first line")) + + input.SwitchToCommitsWindow() + assert.MatchMainViewContent(MatchesRegexp("first line\n\\s*\n\\s*third line")) + }, +}) diff --git a/pkg/integration/tests/tests.go b/pkg/integration/tests/tests.go index 9e48ed0fc..e1a23bb14 100644 --- a/pkg/integration/tests/tests.go +++ b/pkg/integration/tests/tests.go @@ -36,6 +36,7 @@ var tests = []*components.IntegrationTest{ cherry_pick.CherryPick, cherry_pick.CherryPickConflicts, commit.Commit, + commit.CommitMultiline, commit.NewBranch, commit.Staged, commit.Unstaged, diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/index b/test/integration/commitMultiline/expected/repo/.git_keep/index deleted file mode 100644 index a08b4116ed82b32096ee3fb2e1be7b23fe2eb599..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 425 zcmZ?q402{*U|<4b)+EtqW&D8}f-ss9D8>|R&(6TmxP*a$@heb`2oSR^-ShabYU+(I z5us5$`A!!Cyjr@iGO*`Xre)@&8Uhu7^b5rE=D}#FIdbUcNbvkHYEasD?&YdQ;Z^-D zue9e|sKd-Lf|?`PaPud~91smPM<3ms``NtOXUd+v;XkEtNL|3oUt`x1X_z_2P;-Q4 zEK>)W1EQhkIG~$z$>ivR@P9_f%3h_vIBoGIDfZUu5STe8P;-P=7_))Q0nt!%0@2O! zH_4Z}x=U01mLlh)SBpN~-`)0+A7+jz(43GUS63h<$zZBrz-6%Tlu6^?H%6`-v|gRx gu6zH{661a4-2Q_5a=%XHJ)>KEYI;eh3X8;a0Nc-oga7~l diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/logs/HEAD b/test/integration/commitMultiline/expected/repo/.git_keep/logs/HEAD deleted file mode 100644 index 88b99d1ab..000000000 --- a/test/integration/commitMultiline/expected/repo/.git_keep/logs/HEAD +++ /dev/null @@ -1,5 +0,0 @@ -0000000000000000000000000000000000000000 176069f0ded1db43eecb3b629a6077dba6c68295 CI 1645602422 +1100 commit (initial): myfile1 -176069f0ded1db43eecb3b629a6077dba6c68295 9f1b5440546da24daad7014ccf3e1f4d81f9414b CI 1645602422 +1100 commit: myfile2 -9f1b5440546da24daad7014ccf3e1f4d81f9414b 3933a268c502712421b7bfa04888319d6f108574 CI 1645602422 +1100 commit: myfile3 -3933a268c502712421b7bfa04888319d6f108574 37128a3020849daa0847462d14c384cc74c42ae0 CI 1645602422 +1100 commit: myfile4 -37128a3020849daa0847462d14c384cc74c42ae0 574013716a7f007a27b647b90cdbc78d006d792b CI 1645602427 +1100 commit: first line diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/commitMultiline/expected/repo/.git_keep/logs/refs/heads/master deleted file mode 100644 index 88b99d1ab..000000000 --- a/test/integration/commitMultiline/expected/repo/.git_keep/logs/refs/heads/master +++ /dev/null @@ -1,5 +0,0 @@ -0000000000000000000000000000000000000000 176069f0ded1db43eecb3b629a6077dba6c68295 CI 1645602422 +1100 commit (initial): myfile1 -176069f0ded1db43eecb3b629a6077dba6c68295 9f1b5440546da24daad7014ccf3e1f4d81f9414b CI 1645602422 +1100 commit: myfile2 -9f1b5440546da24daad7014ccf3e1f4d81f9414b 3933a268c502712421b7bfa04888319d6f108574 CI 1645602422 +1100 commit: myfile3 -3933a268c502712421b7bfa04888319d6f108574 37128a3020849daa0847462d14c384cc74c42ae0 CI 1645602422 +1100 commit: myfile4 -37128a3020849daa0847462d14c384cc74c42ae0 574013716a7f007a27b647b90cdbc78d006d792b CI 1645602427 +1100 commit: first line diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/commitMultiline/expected/repo/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 deleted file mode 100644 index 7f2ebf4eeb6ad6875bcc2a2b91ca3345ee06b45e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52 zcmb~ZE#08nZNMgRZ+ diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/commitMultiline/expected/repo/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce deleted file mode 100644 index 0a734f98100d24e67455a3cfa8497adaccc7a422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 103 zcmV-t0GR)H0V^p=O;s>7Fl8__FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL J8UTCqE3ZN5G4lWb diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/commitMultiline/expected/repo/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 deleted file mode 100644 index 31ae3f5ba89b96ad2e268134913bd913a0bc46d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 128 zcmV-`0Du2@0V^p=O;s>7F<>w>FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL i8byf-!zGiW55oT$9V>g4{^GR7m!#NRuR{Q5NjxpS$UUzB diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/30/a1ca3481fdec3245b02aeacfb72ddfe2a433be b/test/integration/commitMultiline/expected/repo/.git_keep/objects/30/a1ca3481fdec3245b02aeacfb72ddfe2a433be deleted file mode 100644 index aca754d63288ea16d4cd69754eac3b0cba133abe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 154 zcmV;L0A>Gp0V^p=O;s>7H)Sw1FfcPQQOK=K%gjkNWLUcA@n6-{8($(qqj>V2E(CbB zbYDeLV#FZ9^TVh?Y2Ue*s}_Y<^|!pzo^PR!qQsctem1Z6nX+eZ_)jSuQWx;@*VuJL z8byf-!zGiW55oT$9V>g4{^GR7m!#NRuR~Cjm@@dA~0be5qjz~(zwAwV@rvkzqe2DI?TY7wY9lh zOmynIs&!Q`5HR=%d-=aM<0+48QhZhi7TJBfwC1$5+a3RBHMF-DK+ zAr&EVAd}zyx$brt?R6OM`pIou^itM#vna#@N9*hv5x^YunCkkcZrZobi<0>PFtRse DAMi_! diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/39/33a268c502712421b7bfa04888319d6f108574 b/test/integration/commitMultiline/expected/repo/.git_keep/objects/39/33a268c502712421b7bfa04888319d6f108574 deleted file mode 100644 index 4195b00e1096723a64cb6d9c0a23e72ca2ec816d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 149 zcmV;G0BZku0gaA93c@fD06pgwxeJm_HfahXLQj3hX0wY0V@rvkzqe2DG%(Czcx`Rz z7DhbvUBvnVL*SgCDu$qhL6s^5&5m;k;5i;-F&pjj>ULBp5z$3Vl{{9WIygXP4FZZa zgN_JT488kf-R(5n>onixLv4G?h1YhokT53a(R+IaaLyd|nCkLpZrWFurv&o@F&#SD Dq})TL diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/4f/346f1ad5ba2917da2109e2eaa2f2dfbb86f10f b/test/integration/commitMultiline/expected/repo/.git_keep/objects/4f/346f1ad5ba2917da2109e2eaa2f2dfbb86f10f deleted file mode 100644 index 953241815cfa19b4d357807bedcbb2277b2e3ba8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb{;fo08o?%QUCw| diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/57/4013716a7f007a27b647b90cdbc78d006d792b b/test/integration/commitMultiline/expected/repo/.git_keep/objects/57/4013716a7f007a27b647b90cdbc78d006d792b deleted file mode 100644 index d675c1840..000000000 --- a/test/integration/commitMultiline/expected/repo/.git_keep/objects/57/4013716a7f007a27b647b90cdbc78d006d792b +++ /dev/null @@ -1,2 +0,0 @@ -xK -0 D)/YVbJ)dc(B 7 t5c뚫E.Z=E7%Ԍ,0IQEj}pB.1H|$@Buދ{~x=ɾ>ki :`NzL]9_!? \ No newline at end of file diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/9f/1b5440546da24daad7014ccf3e1f4d81f9414b b/test/integration/commitMultiline/expected/repo/.git_keep/objects/9f/1b5440546da24daad7014ccf3e1f4d81f9414b deleted file mode 100644 index 9ea933b39bf38475d9bc5ace7c9fda421a30164d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmV;F0Biqv0gaAJ3c@fDKwak)*$Xl=NhbzGgsyswd?r|EOeqoc_T~s~AMe3St=6?` z^!C&b5gnYd7$#pJXOZIB3;Pn;@RgV|QG`MkS?%GF*9aZM5Fks&9IX*a(L^R67@W&7 za2lnbRCxDiJM_Hh+q^vF6Y9RnCAE6j$aZ2NOQg?;0BX=N)#XoJ)o)ohA@u{{XgWsx CE<|zw diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/commitMultiline/expected/repo/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 deleted file mode 100644 index 285df3e5fbab12262e28d85e78af8a31cd0024c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb`~^A08nuUMF0Q* diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/commitMultiline/expected/repo/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 deleted file mode 100644 index 96d2e71a6af75cdd27ac5d9628a27faecc40fb66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmV-T0J8sh0V^p=O;s>AU@$Z=Ff%bx$gNDv%tB=N-?^8o7KK;!x4hDxZ=ntVWIZ01*pecg diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/commitMultiline/expected/repo/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 deleted file mode 100644 index d39fa7d2fecf1c45a132dfe3a8758952f3c8d968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb}lpN08nuUO8@`> diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/commitMultiline/expected/repo/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b deleted file mode 100644 index 9b771fc2f6f41f91b00976b4ff3f8f9935f7931e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21 ccmb>`CU&08otwO#lD@ diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/refs/heads/master b/test/integration/commitMultiline/expected/repo/.git_keep/refs/heads/master deleted file mode 100644 index c44ada3dd..000000000 --- a/test/integration/commitMultiline/expected/repo/.git_keep/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -574013716a7f007a27b647b90cdbc78d006d792b diff --git a/test/integration/commitMultiline/expected/repo/myfile1 b/test/integration/commitMultiline/expected/repo/myfile1 deleted file mode 100644 index a5bce3fd2..000000000 --- a/test/integration/commitMultiline/expected/repo/myfile1 +++ /dev/null @@ -1 +0,0 @@ -test1 diff --git a/test/integration/commitMultiline/expected/repo/myfile2 b/test/integration/commitMultiline/expected/repo/myfile2 deleted file mode 100644 index 180cf8328..000000000 --- a/test/integration/commitMultiline/expected/repo/myfile2 +++ /dev/null @@ -1 +0,0 @@ -test2 diff --git a/test/integration/commitMultiline/expected/repo/myfile3 b/test/integration/commitMultiline/expected/repo/myfile3 deleted file mode 100644 index df6b0d2bc..000000000 --- a/test/integration/commitMultiline/expected/repo/myfile3 +++ /dev/null @@ -1 +0,0 @@ -test3 diff --git a/test/integration/commitMultiline/expected/repo/myfile4 b/test/integration/commitMultiline/expected/repo/myfile4 deleted file mode 100644 index d234c5e05..000000000 --- a/test/integration/commitMultiline/expected/repo/myfile4 +++ /dev/null @@ -1 +0,0 @@ -test4 diff --git a/test/integration/commitMultiline/expected/repo/myfile5 b/test/integration/commitMultiline/expected/repo/myfile5 deleted file mode 100644 index 4f346f1ad..000000000 --- a/test/integration/commitMultiline/expected/repo/myfile5 +++ /dev/null @@ -1 +0,0 @@ -test5 diff --git a/test/integration/commitMultiline/recording.json b/test/integration/commitMultiline/recording.json deleted file mode 100644 index bb0d16af6..000000000 --- a/test/integration/commitMultiline/recording.json +++ /dev/null @@ -1 +0,0 @@ -{"KeyEvents":[{"Timestamp":931,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1467,"Mod":0,"Key":256,"Ch":99},{"Timestamp":2035,"Mod":0,"Key":256,"Ch":102},{"Timestamp":2090,"Mod":0,"Key":256,"Ch":105},{"Timestamp":2162,"Mod":0,"Key":256,"Ch":114},{"Timestamp":2259,"Mod":0,"Key":256,"Ch":115},{"Timestamp":2314,"Mod":0,"Key":256,"Ch":116},{"Timestamp":2411,"Mod":0,"Key":256,"Ch":32},{"Timestamp":2546,"Mod":0,"Key":256,"Ch":108},{"Timestamp":2578,"Mod":0,"Key":256,"Ch":105},{"Timestamp":2627,"Mod":0,"Key":256,"Ch":110},{"Timestamp":2691,"Mod":0,"Key":256,"Ch":101},{"Timestamp":3358,"Mod":4,"Key":13,"Ch":13},{"Timestamp":3577,"Mod":4,"Key":13,"Ch":13},{"Timestamp":3810,"Mod":0,"Key":256,"Ch":116},{"Timestamp":3874,"Mod":0,"Key":256,"Ch":104},{"Timestamp":3914,"Mod":0,"Key":256,"Ch":105},{"Timestamp":3986,"Mod":0,"Key":256,"Ch":114},{"Timestamp":4107,"Mod":0,"Key":256,"Ch":100},{"Timestamp":4195,"Mod":0,"Key":256,"Ch":32},{"Timestamp":4291,"Mod":0,"Key":256,"Ch":108},{"Timestamp":4322,"Mod":0,"Key":256,"Ch":105},{"Timestamp":4370,"Mod":0,"Key":256,"Ch":110},{"Timestamp":4426,"Mod":0,"Key":256,"Ch":101},{"Timestamp":4603,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5267,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file diff --git a/test/integration/commitMultiline/setup.sh b/test/integration/commitMultiline/setup.sh deleted file mode 100644 index c6c6a9271..000000000 --- a/test/integration/commitMultiline/setup.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -set -e - -cd $1 - -git init - -git config user.email "CI@example.com" -git config user.name "CI" - -echo test1 > myfile1 -git add . -git commit -am "myfile1" -echo test2 > myfile2 -git add . -git commit -am "myfile2" -echo test3 > myfile3 -git add . -git commit -am "myfile3" -echo test4 > myfile4 -git add . -git commit -am "myfile4" -echo test5 > myfile5 diff --git a/test/integration/commitMultiline/test.json b/test/integration/commitMultiline/test.json deleted file mode 100644 index 5ac0bb1f5..000000000 --- a/test/integration/commitMultiline/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "description": "stage a file and commit the change with a multiline commit message", - "speed": 15 -} diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/COMMIT_EDITMSG similarity index 100% rename from test/integration/commitMultiline/expected/repo/.git_keep/COMMIT_EDITMSG rename to test/integration_new/commit/commit_multiline/expected/repo/.git_keep/COMMIT_EDITMSG diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/FETCH_HEAD b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/FETCH_HEAD similarity index 100% rename from test/integration/commitMultiline/expected/repo/.git_keep/FETCH_HEAD rename to test/integration_new/commit/commit_multiline/expected/repo/.git_keep/FETCH_HEAD diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/HEAD b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/HEAD similarity index 100% rename from test/integration/commitMultiline/expected/repo/.git_keep/HEAD rename to test/integration_new/commit/commit_multiline/expected/repo/.git_keep/HEAD diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/config b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/config similarity index 74% rename from test/integration/commitMultiline/expected/repo/.git_keep/config rename to test/integration_new/commit/commit_multiline/expected/repo/.git_keep/config index 8ae104545..1723dc5b9 100644 --- a/test/integration/commitMultiline/expected/repo/.git_keep/config +++ b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/config @@ -8,3 +8,7 @@ [user] email = CI@example.com name = CI +[commit] + gpgSign = false +[protocol "file"] + allow = always diff --git a/test/integration/commitMultiline/expected/repo/.git_keep/description b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/description similarity index 100% rename from test/integration/commitMultiline/expected/repo/.git_keep/description rename to test/integration_new/commit/commit_multiline/expected/repo/.git_keep/description diff --git a/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/index b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/index new file mode 100644 index 0000000000000000000000000000000000000000..0d114f768726e8ddbdf38681466b4c355c6f7fe6 GIT binary patch literal 137 zcmZ?q402{*U|<4b#^i-F+5{O3a$z(h0|OU(PY@piL*o*l^jDx75g_JUyEIKS{qBcl z{tUVNRX>5kdkCDR50M;an8JdH0FxzN 1671534726 +1100 commit (initial): first line diff --git a/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/logs/refs/heads/master b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..b5d6fc0c7 --- /dev/null +++ b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/logs/refs/heads/master @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 f5b4b9b810f0c3d13754db99d24b04de451f8cec CI 1671534726 +1100 commit (initial): first line diff --git a/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/objects/0c/4369dfc55cd41da90e149f2fa8ee3fc0a8f297 b/test/integration_new/commit/commit_multiline/expected/repo/.git_keep/objects/0c/4369dfc55cd41da90e149f2fa8ee3fc0a8f297 new file mode 100644 index 0000000000000000000000000000000000000000..79af4f45f798b3b47d9f64165886623304a60f87 GIT binary patch literal 51 zcmV-30L=e*0V^p=O;s>9VK6i>Ff%bx$gNDv%t>WfyEIKS{qBcl{t$