summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-06-09 19:52:08 +1000
committerJesse Duffield <jessedduffield@gmail.com>2022-06-11 11:23:56 +1000
commitb1e4968d0b1c39c46c084264d91f637a3cde4a7d (patch)
tree6d4904a852aa9a27786742c679ae4bc6dd5a5bc6 /test
parent36aa01c3accffcf6e8790dd0407005765da844a4 (diff)
allow opening lazygit to a specific panel
Diffstat (limited to 'test')
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/COMMIT_EDITMSG1
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/FETCH_HEAD0
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/HEAD1
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/config10
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/description1
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/indexbin0 -> 65 bytes
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/info/exclude7
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/logs/HEAD3
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/logs/refs/heads/master1
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/logs/refs/heads/other1
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/objects/45/fe0608335366a31a1ad6dacbdcc6b17d31a5b6bin0 -> 118 bytes
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904bin0 -> 15 bytes
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/refs/heads/master1
-rw-r--r--test/integration/gitArg/expected/repo/.git_keep/refs/heads/other1
-rw-r--r--test/integration/gitArg/recording.json1
-rw-r--r--test/integration/gitArg/setup.sh14
-rw-r--r--test/integration/gitArg/test.json5
17 files changed, 47 insertions, 0 deletions
diff --git a/test/integration/gitArg/expected/repo/.git_keep/COMMIT_EDITMSG b/test/integration/gitArg/expected/repo/.git_keep/COMMIT_EDITMSG
new file mode 100644
index 000000000..907b30816
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/COMMIT_EDITMSG
@@ -0,0 +1 @@
+blah
diff --git a/test/integration/gitArg/expected/repo/.git_keep/FETCH_HEAD b/test/integration/gitArg/expected/repo/.git_keep/FETCH_HEAD
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/FETCH_HEAD
diff --git a/test/integration/gitArg/expected/repo/.git_keep/HEAD b/test/integration/gitArg/expected/repo/.git_keep/HEAD
new file mode 100644
index 000000000..cb089cd89
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/HEAD
@@ -0,0 +1 @@
+ref: refs/heads/master
diff --git a/test/integration/gitArg/expected/repo/.git_keep/config b/test/integration/gitArg/expected/repo/.git_keep/config
new file mode 100644
index 000000000..8ae104545
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.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/gitArg/expected/repo/.git_keep/description b/test/integration/gitArg/expected/repo/.git_keep/description
new file mode 100644
index 000000000..498b267a8
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/description
@@ -0,0 +1 @@
+Unnamed repository; edit this file 'description' to name the repository.
diff --git a/test/integration/gitArg/expected/repo/.git_keep/index b/test/integration/gitArg/expected/repo/.git_keep/index
new file mode 100644
index 000000000..65d675154
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/index
Binary files differ
diff --git a/test/integration/gitArg/expected/repo/.git_keep/info/exclude b/test/integration/gitArg/expected/repo/.git_keep/info/exclude
new file mode 100644
index 000000000..8e9f2071f
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.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/gitArg/expected/repo/.git_keep/logs/HEAD b/test/integration/gitArg/expected/repo/.git_keep/logs/HEAD
new file mode 100644
index 000000000..eaac3a34d
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/logs/HEAD
@@ -0,0 +1,3 @@
+0000000000000000000000000000000000000000 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 commit (initial): blah
+45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 checkout: moving from master to other
+45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768291 +1000 checkout: moving from other to master
diff --git a/test/integration/gitArg/expected/repo/.git_keep/logs/refs/heads/master b/test/integration/gitArg/expected/repo/.git_keep/logs/refs/heads/master
new file mode 100644
index 000000000..12b2c7ee4
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/logs/refs/heads/master
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 commit (initial): blah
diff --git a/test/integration/gitArg/expected/repo/.git_keep/logs/refs/heads/other b/test/integration/gitArg/expected/repo/.git_keep/logs/refs/heads/other
new file mode 100644
index 000000000..d1b9aa145
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/logs/refs/heads/other
@@ -0,0 +1 @@
+0000000000000000000000000000000000000000 45fe0608335366a31a1ad6dacbdcc6b17d31a5b6 CI <CI@example.com> 1654768290 +1000 branch: Created from HEAD
diff --git a/test/integration/gitArg/expected/repo/.git_keep/objects/45/fe0608335366a31a1ad6dacbdcc6b17d31a5b6 b/test/integration/gitArg/expected/repo/.git_keep/objects/45/fe0608335366a31a1ad6dacbdcc6b17d31a5b6
new file mode 100644
index 000000000..3171fbc5a
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/objects/45/fe0608335366a31a1ad6dacbdcc6b17d31a5b6
Binary files differ
diff --git a/test/integration/gitArg/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904 b/test/integration/gitArg/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904
new file mode 100644
index 000000000..adf64119a
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/objects/4b/825dc642cb6eb9a060e54bf8d69288fbee4904
Binary files differ
diff --git a/test/integration/gitArg/expected/repo/.git_keep/refs/heads/master b/test/integration/gitArg/expected/repo/.git_keep/refs/heads/master
new file mode 100644
index 000000000..86a280f52
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/refs/heads/master
@@ -0,0 +1 @@
+45fe0608335366a31a1ad6dacbdcc6b17d31a5b6
diff --git a/test/integration/gitArg/expected/repo/.git_keep/refs/heads/other b/test/integration/gitArg/expected/repo/.git_keep/refs/heads/other
new file mode 100644
index 000000000..86a280f52
--- /dev/null
+++ b/test/integration/gitArg/expected/repo/.git_keep/refs/heads/other
@@ -0,0 +1 @@
+45fe0608335366a31a1ad6dacbdcc6b17d31a5b6
diff --git a/test/integration/gitArg/recording.json b/test/integration/gitArg/recording.json
new file mode 100644
index 000000000..0a42da3cf
--- /dev/null
+++ b/test/integration/gitArg/recording.json
@@ -0,0 +1 @@
+{"KeyEvents":[{"Timestamp":620,"Mod":0,"Key":258,"Ch":0},{"Timestamp":995,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1865,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]} \ No newline at end of file
diff --git a/test/integration/gitArg/setup.sh b/test/integration/gitArg/setup.sh
new file mode 100644
index 000000000..d71cc83e4
--- /dev/null
+++ b/test/integration/gitArg/setup.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+cd $1
+
+git init
+
+git config user.email "CI@example.com"
+git config user.name "CI"
+
+git commit --allow-empty -m "blah"
+
+git checkout -b other
diff --git a/test/integration/gitArg/test.json b/test/integration/gitArg/test.json
new file mode 100644
index 000000000..0261df3ea
--- /dev/null
+++ b/test/integration/gitArg/test.json
@@ -0,0 +1,5 @@
+{
+ "description": "Open lazygit to the branches panel",
+ "speed": 10,
+ "extraCmdArgs": "branch"
+}