1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-04 03:48:07 +02:00

test: add integration test for Quote

This commit is contained in:
Ryooooooga 2022-10-01 20:51:44 +09:00
parent 19df238b77
commit e16f1ba84f
No known key found for this signature in database
GPG Key ID: 07CF200DFCC20C25
11 changed files with 16 additions and 15 deletions

View File

@ -17,7 +17,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
{
Key: "a",
Context: "files",
Command: `echo "{{.Form.FileContent}}" > {{.Form.FileName}}`,
Command: `echo {{.Form.FileContent | Quote}} > {{.Form.FileName | Quote}}`,
Prompts: []config.CustomCommandPrompt{
{
Key: "FileName",
@ -37,7 +37,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
{
Name: "bar",
Description: "Bar",
Value: "BAR",
Value: `"BAR"`,
},
{
Name: "baz",
@ -67,7 +67,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
assert.InPrompt()
assert.MatchCurrentViewTitle(Equals("Enter a file name"))
input.Type("myfile")
input.Type("my file")
input.Confirm()
assert.InMenu()
@ -82,7 +82,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
input.Confirm()
assert.WorkingTreeFileCount(1)
assert.MatchSelectedLine(Contains("myfile"))
assert.MatchMainViewContent(Contains("BAR"))
assert.MatchSelectedLine(Contains("my file"))
assert.MatchMainViewContent(Contains(`"BAR"`))
},
})

View File

@ -3,6 +3,10 @@
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[user]
email = CI@example.com
name = CI
[commit]
gpgSign = false

View File

@ -1,6 +0,0 @@
# 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]
# *~

View File

@ -1 +1 @@
0000000000000000000000000000000000000000 6cd61dc75eb17cf3e01d4d5f8f2b38a73ed9be90 CI <CI@example.com> 1660591942 +0000 commit (initial): blah
0000000000000000000000000000000000000000 4687e94a43ed02b2ba08f3e6160ee22b92e64413 CI <CI@example.com> 1664625021 +0900 commit (initial): blah

View File

@ -1 +1 @@
0000000000000000000000000000000000000000 6cd61dc75eb17cf3e01d4d5f8f2b38a73ed9be90 CI <CI@example.com> 1660591942 +0000 commit (initial): blah
0000000000000000000000000000000000000000 4687e94a43ed02b2ba08f3e6160ee22b92e64413 CI <CI@example.com> 1664625021 +0900 commit (initial): blah

View File

@ -0,0 +1,3 @@
x�Í1
Ã0 @ÑÎ>…öB‘UYØPB SŽa9
)ĸzüä]?~iµ¾;x~Þúa¬‘ÂR„©¨˜¦Œ‚X׸H¢W5ã„ìò·oí€i†×4�öËõ³Û£´:€a¡€äᎠÑ]õštû“;ÝóæN¬£+²

View File

@ -1 +1 @@
6cd61dc75eb17cf3e01d4d5f8f2b38a73ed9be90
4687e94a43ed02b2ba08f3e6160ee22b92e64413