diff options
34 files changed, 97 insertions, 0 deletions
diff --git a/test/integration/customCommandsComplex/config/config.yml b/test/integration/customCommandsComplex/config/config.yml new file mode 100644 index 000000000..69072c2c7 --- /dev/null +++ b/test/integration/customCommandsComplex/config/config.yml @@ -0,0 +1,31 @@ +disableStartupPopups: true +customCommands: + - key: 'N' + description: 'Add file' + context: 'localBranches' + command: 'echo "{{index .PromptResponses 0}} {{index .PromptResponses 1}} {{index .PromptResponses 2}} {{ .SelectedLocalBranch.Name }}" > output.txt' + loadingText: 'Running custom command...' + prompts: + - type: 'menuFromCommand' + title: 'Title' + command: 'git log --oneline --pretty=%B' + filter: '(?P<commit_message>.*)' + valueFormat: '{{ .commit_message }}' + labelFormat: '{{ .commit_message | yellow }}' + - type: 'input' + title: 'Description' + initialValue: "{{ if .SelectedLocalBranch.Name }}Branch: #{{ .SelectedLocalBranch.Name }}{{end}}" + - type: 'menu' + title: 'yes or no' + options: + - name: 'no' + value: 'false' + - name: 'yes' + value: 'true' +gui: + theme: + activeBorderColor: + - green + - bold + SelectedRangeBgcolor: + - reverse diff --git a/test/integration/customCommandsComplex/expected/.git_keep/COMMIT_EDITMSG b/test/integration/customCommandsComplex/expected/.git_keep/COMMIT_EDITMSG new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/COMMIT_EDITMSG @@ -0,0 +1 @@ +test diff --git a/test/integration/customCommandsComplex/expected/.git_keep/FETCH_HEAD b/test/integration/customCommandsComplex/expected/.git_keep/FETCH_HEAD new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/FETCH_HEAD diff --git a/test/integration/customCommandsComplex/expected/.git_keep/HEAD b/test/integration/customCommandsComplex/expected/.git_keep/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/test/integration/customCommandsComplex/expected/.git_keep/config b/test/integration/customCommandsComplex/expected/.git_keep/config new file mode 100644 index 000000000..8ae104545 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/config @@ -0,0 +1,10 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true + ignorecase = true + precomposeunicode = true +[user] + email = CI@example.com + name = CI diff --git a/test/integration/customCommandsComplex/expected/.git_keep/description b/test/integration/customCommandsComplex/expected/.git_keep/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/test/integration/customCommandsComplex/expected/.git_keep/index b/test/integration/customCommandsComplex/expected/.git_keep/index Binary files differnew file mode 100644 index 000000000..005c7dd34 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/index diff --git a/test/integration/customCommandsComplex/expected/.git_keep/info/exclude b/test/integration/customCommandsComplex/expected/.git_keep/info/exclude new file mode 100644 index 000000000..8e9f2071f --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/info/exclude @@ -0,0 +1,7 @@ +# 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] +# *~ +.DS_Store diff --git a/test/integration/customCommandsComplex/expected/.git_keep/logs/HEAD b/test/integration/customCommandsComplex/expected/.git_keep/logs/HEAD new file mode 100644 index 000000000..605138dc1 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/logs/HEAD @@ -0,0 +1,5 @@ +0000000000000000000000000000000000000000 ab38b1ca116f77648925d952e731f419db360cdb CI <CI@example.com> 1642201096 +1100 commit (initial): myfile1 +ab38b1ca116f77648925d952e731f419db360cdb 4fdfedfd9d406506be8b02f5b863dbc08d43cc9f CI <CI@example.com> 1642201096 +1100 commit: myfile2 +4fdfedfd9d406506be8b02f5b863dbc08d43cc9f 7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 CI <CI@example.com> 1642201096 +1100 commit: myfile3 +7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 f708d3e3819470a69f6c8562ff1e68eef02f8cac CI <CI@example.com> 1642201096 +1100 commit: myfile4 +f708d3e3819470a69f6c8562ff1e68eef02f8cac 5428838691c97ac192c8b8e1c3f573d8541a94b6 CI <CI@example.com> 1642201104 +1100 commit: test diff --git a/test/integration/customCommandsComplex/expected/.git_keep/logs/refs/heads/master b/test/integration/customCommandsComplex/expected/.git_keep/logs/refs/heads/master new file mode 100644 index 000000000..605138dc1 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/logs/refs/heads/master @@ -0,0 +1,5 @@ +0000000000000000000000000000000000000000 ab38b1ca116f77648925d952e731f419db360cdb CI <CI@example.com> 1642201096 +1100 commit (initial): myfile1 +ab38b1ca116f77648925d952e731f419db360cdb 4fdfedfd9d406506be8b02f5b863dbc08d43cc9f CI <CI@example.com> 1642201096 +1100 commit: myfile2 +4fdfedfd9d406506be8b02f5b863dbc08d43cc9f 7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 CI <CI@example.com> 1642201096 +1100 commit: myfile3 +7dd93a4be3d27d40fbe791d6d77e0d2fedc4d785 f708d3e3819470a69f6c8562ff1e68eef02f8cac CI <CI@example.com> 1642201096 +1100 commit: myfile4 +f708d3e3819470a69f6c8562ff1e68eef02f8cac 5428838691c97ac192c8b8e1c3f573d8541a94b6 CI <CI@example.com> 1642201104 +1100 commit: test diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/05/3cf208ac3728c36c6ed86f2a03a1fb72a8e6bc b/test/integration/customCommandsComplex/expected/.git_keep/objects/05/3cf208ac3728c36c6ed86f2a03a1fb72a8e6bc Binary files differnew file mode 100644 index 000000000..161576b97 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/05/3cf208ac3728c36c6ed86f2a03a1fb72a8e6bc diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 b/test/integration/customCommandsComplex/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 Binary files differnew file mode 100644 index 000000000..7f2ebf4ee --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/0e/6cf0a6b79e8d44e186d812a1f74b43d64fac52 diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 b/test/integration/customCommandsComplex/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 Binary files differnew file mode 100644 index 000000000..f74bf2335 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/18/0cf8328022becee9aaa2577a8f84ea2b9f3827 diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce b/test/integration/customCommandsComplex/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce Binary files differnew file mode 100644 index 000000000..0a734f981 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/2b/173c861df433fa43ffad13f80c8b312c5c8bce diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 b/test/integration/customCommandsComplex/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 Binary files differnew file mode 100644 index 000000000..31ae3f5ba --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/2f/6174050380438f14b16658a356e762435ca591 diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/4f/dfedfd9d406506be8b02f5b863dbc08d43cc9f b/test/integration/customCommandsComplex/expected/.git_keep/objects/4f/dfedfd9d406506be8b02f5b863dbc08d43cc9f Binary files differnew file mode 100644 index 000000000..5bcc5c659 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/4f/dfedfd9d406506be8b02f5b863dbc08d43cc9f diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/54/28838691c97ac192c8b8e1c3f573d8541a94b6 b/test/integration/customCommandsComplex/expected/.git_keep/objects/54/28838691c97ac192c8b8e1c3f573d8541a94b6 Binary files differnew file mode 100644 index 000000000..bd598d7ab --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/54/28838691c97ac192c8b8e1c3f573d8541a94b6 diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/7d/b446a082f8c10183f1f27178698f07f3750b6b b/test/integration/customCommandsComplex/expected/.git_keep/objects/7d/b446a082f8c10183f1f27178698f07f3750b6b Binary files differnew file mode 100644 index 000000000..6de444c0f --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/7d/b446a082f8c10183f1f27178698f07f3750b6b diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/7d/d93a4be3d27d40fbe791d6d77e0d2fedc4d785 b/test/integration/customCommandsComplex/expected/.git_keep/objects/7d/d93a4be3d27d40fbe791d6d77e0d2fedc4d785 Binary files differnew file mode 100644 index 000000000..a96d76d40 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/7d/d93a4be3d27d40fbe791d6d77e0d2fedc4d785 diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 b/test/integration/customCommandsComplex/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 Binary files differnew file mode 100644 index 000000000..285df3e5f --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/a5/bce3fd2565d8f458555a0c6f42d0504a848bd5 diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 b/test/integration/customCommandsComplex/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 Binary files differnew file mode 100644 index 000000000..96d2e71a6 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/a7/341a59f0ddeef969e69fb6368266d22b0f2416 diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/ab/38b1ca116f77648925d952e731f419db360cdb b/test/integration/customCommandsComplex/expected/.git_keep/objects/ab/38b1ca116f77648925d952e731f419db360cdb new file mode 100644 index 000000000..3de7c78a7 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/ab/38b1ca116f77648925d952e731f419db360cdb @@ -0,0 +1,2 @@ +xA +0@ѮsL:#)1P!")#tyS5[˥*`5df 9T:KL⧽qzm[
@#a/p%Btg='MξeY.,,
\ No newline at end of file diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 b/test/integration/customCommandsComplex/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 Binary files differnew file mode 100644 index 000000000..d39fa7d2f --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/d2/34c5e057fe32c676ea67e8cb38f4625ddaeb54 diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b b/test/integration/customCommandsComplex/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b Binary files differnew file mode 100644 index 000000000..9b771fc2f --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/df/6b0d2bcc76e6ec0fca20c227104a4f28bac41b diff --git a/test/integration/customCommandsComplex/expected/.git_keep/objects/f7/08d3e3819470a69f6c8562ff1e68eef02f8cac b/test/integration/customCommandsComplex/expected/.git_keep/objects/f7/08d3e3819470a69f6c8562ff1e68eef02f8cac new file mode 100644 index 000000000..010f8e879 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/objects/f7/08d3e3819470a69f6c8562ff1e68eef02f8cac @@ -0,0 +1,2 @@ +xA +0@Q9E$I"BW=F`R"~◵[Lt껪u1*Ҍa>FvC!nHfYcBaQA\U)$q&c88KY"s؞QrӾuy*39
\ No newline at end of file diff --git a/test/integration/customCommandsComplex/expected/.git_keep/refs/heads/master b/test/integration/customCommandsComplex/expected/.git_keep/refs/heads/master new file mode 100644 index 000000000..8d1ca4f04 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/.git_keep/refs/heads/master @@ -0,0 +1 @@ +5428838691c97ac192c8b8e1c3f573d8541a94b6 diff --git a/test/integration/customCommandsComplex/expected/myfile1 b/test/integration/customCommandsComplex/expected/myfile1 new file mode 100644 index 000000000..a5bce3fd2 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/myfile1 @@ -0,0 +1 @@ +test1 diff --git a/test/integration/customCommandsComplex/expected/myfile2 b/test/integration/customCommandsComplex/expected/myfile2 new file mode 100644 index 000000000..180cf8328 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/myfile2 @@ -0,0 +1 @@ +test2 diff --git a/test/integration/customCommandsComplex/expected/myfile3 b/test/integration/customCommandsComplex/expected/myfile3 new file mode 100644 index 000000000..df6b0d2bc --- /dev/null +++ b/test/integration/customCommandsComplex/expected/myfile3 @@ -0,0 +1 @@ +test3 diff --git a/test/integration/customCommandsComplex/expected/myfile4 b/test/integration/customCommandsComplex/expected/myfile4 new file mode 100644 index 000000000..d234c5e05 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/myfile4 @@ -0,0 +1 @@ +test4 diff --git a/test/integration/customCommandsComplex/expected/output.txt b/test/integration/customCommandsComplex/expected/output.txt new file mode 100644 index 000000000..7db446a08 --- /dev/null +++ b/test/integration/customCommandsComplex/expected/output.txt @@ -0,0 +1 @@ +myfile2 Branch: #master haha true master diff --git a/test/integration/customCommandsComplex/recording.json b/test/integration/customCommandsComplex/recording.json new file mode 100644 index 000000000..8fdbd648c --- /dev/null +++ b/test/integration/customCommandsComplex/recording.json @@ -0,0 +1 @@ +{"KeyEvents":[{"Timestamp":623,"Mod":0,"Key":259,"Ch":0},{"Timestamp":1369,"Mod":0,"Key":256,"Ch":78},{"Timestamp":1904,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2033,"Mod":0,"Key":258,"Ch":0},{"Timestamp":2328,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2848,"Mod":0,"Key":256,"Ch":32},{"Timestamp":3296,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3616,"Mod":0,"Key":127,"Ch":127},{"Timestamp":3824,"Mod":0,"Key":256,"Ch":104},{"Timestamp":3879,"Mod":0,"Key":256,"Ch":97},{"Timestamp":3927,"Mod":0,"Key":256,"Ch":104},{"Timestamp":4000,"Mod":0,"Key":256,"Ch":97},{"Timestamp":4239,"Mod":0,"Key":13,"Ch":13},{"Timestamp":4809,"Mod":0,"Key":258,"Ch":0},{"Timestamp":5024,"Mod":0,"Key":13,"Ch":13},{"Timestamp":5824,"Mod":0,"Key":260,"Ch":0},{"Timestamp":6079,"Mod":0,"Key":256,"Ch":32},{"Timestamp":6376,"Mod":0,"Key":256,"Ch":99},{"Timestamp":6591,"Mod":0,"Key":256,"Ch":116},{"Timestamp":6640,"Mod":0,"Key":256,"Ch":101},{"Timestamp":6816,"Mod":0,"Key":256,"Ch":115},{"Timestamp":6856,"Mod":0,"Key":256,"Ch":116},{"Timestamp":7136,"Mod":0,"Key":13,"Ch":13},{"Timestamp":7487,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":36}]}
\ No newline at end of file diff --git a/test/integration/customCommandsComplex/setup.sh b/test/integration/customCommandsComplex/setup.sh new file mode 100644 index 000000000..a37a2823b --- /dev/null +++ b/test/integration/customCommandsComplex/setup.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +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" diff --git a/test/integration/customCommandsComplex/test.json b/test/integration/customCommandsComplex/test.json new file mode 100644 index 000000000..beac0e9ca --- /dev/null +++ b/test/integration/customCommandsComplex/test.json @@ -0,0 +1,4 @@ +{ + "description": "Invoke a custom command that creates a file, and then stage and commit that file. In this case we're using a more customised flow", + "speed": 5 +} |