mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-22 05:29:44 +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",
|
Key: "a",
|
||||||
Context: "files",
|
Context: "files",
|
||||||
Command: `echo "{{.Form.FileContent}}" > {{.Form.FileName}}`,
|
Command: `echo {{.Form.FileContent | Quote}} > {{.Form.FileName | Quote}}`,
|
||||||
Prompts: []config.CustomCommandPrompt{
|
Prompts: []config.CustomCommandPrompt{
|
||||||
{
|
{
|
||||||
Key: "FileName",
|
Key: "FileName",
|
||||||
@ -37,7 +37,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
{
|
{
|
||||||
Name: "bar",
|
Name: "bar",
|
||||||
Description: "Bar",
|
Description: "Bar",
|
||||||
Value: "BAR",
|
Value: `"BAR"`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "baz",
|
Name: "baz",
|
||||||
@ -83,6 +83,6 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
|
|
||||||
assert.WorkingTreeFileCount(1)
|
assert.WorkingTreeFileCount(1)
|
||||||
assert.MatchSelectedLine(Contains("my file"))
|
assert.MatchSelectedLine(Contains("my file"))
|
||||||
assert.MatchMainViewContent(Contains("BAR"))
|
assert.MatchMainViewContent(Contains(`"BAR"`))
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
filemode = true
|
filemode = true
|
||||||
bare = false
|
bare = false
|
||||||
logallrefupdates = true
|
logallrefupdates = true
|
||||||
|
ignorecase = true
|
||||||
|
precomposeunicode = true
|
||||||
[user]
|
[user]
|
||||||
email = CI@example.com
|
email = CI@example.com
|
||||||
name = CI
|
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…
x
Reference in New Issue
Block a user