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:
parent
19df238b77
commit
e16f1ba84f
@ -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"`))
|
||||
},
|
||||
})
|
||||
|
@ -3,6 +3,10 @@
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
||||
[user]
|
||||
email = CI@example.com
|
||||
name = CI
|
||||
[commit]
|
||||
gpgSign = false
|
||||
|
@ -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]
|
||||
# *~
|
@ -1 +1 @@
|
||||
0000000000000000000000000000000000000000 6cd61dc75eb17cf3e01d4d5f8f2b38a73ed9be90 CI <CI@example.com> 1660591942 +0000 commit (initial): blah
|
||||
0000000000000000000000000000000000000000 4687e94a43ed02b2ba08f3e6160ee22b92e64413 CI <CI@example.com> 1664625021 +0900 commit (initial): blah
|
||||
|
@ -1 +1 @@
|
||||
0000000000000000000000000000000000000000 6cd61dc75eb17cf3e01d4d5f8f2b38a73ed9be90 CI <CI@example.com> 1660591942 +0000 commit (initial): blah
|
||||
0000000000000000000000000000000000000000 4687e94a43ed02b2ba08f3e6160ee22b92e64413 CI <CI@example.com> 1664625021 +0900 commit (initial): blah
|
||||
|
@ -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¬£+²
|
Binary file not shown.
@ -1 +1 @@
|
||||
6cd61dc75eb17cf3e01d4d5f8f2b38a73ed9be90
|
||||
4687e94a43ed02b2ba08f3e6160ee22b92e64413
|
||||
|
@ -0,0 +1 @@
|
||||
"BAR"
|
@ -1 +0,0 @@
|
||||
BAR
|
Loading…
Reference in New Issue
Block a user