File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,11 +99,7 @@ func TestDiff(t *testing.T) {
9999 "README.md" ,
100100 }
101101
102- got , err := diff (`echo services/foo/serverless.yml
103- services/bar/config.yml
104-
105- ops/bar/config.yml
106- README.md` )
102+ got , err := diff (`printf 'services/foo/serverless.yml\nservices/bar/config.yml\n\nops/bar/config.yml\nREADME.md\n'` )
107103
108104 assert .NoError (t , err )
109105 assert .Equal (t , want , got )
@@ -114,7 +110,7 @@ func TestDiffWithSubshell(t *testing.T) {
114110 "user-service/infrastructure/cloudfront.yaml" ,
115111 "user-service/serverless.yaml" ,
116112 }
117- got , err := diff ("echo $( cat e2e/multiple-paths) " )
113+ got , err := diff ("cat e2e/multiple-paths" )
118114 assert .NoError (t , err )
119115 assert .Equal (t , want , got )
120116}
@@ -124,7 +120,7 @@ func TestDiffWithQuotedPaths(t *testing.T) {
124120 "projects/test/pages/17_🪁_testfile.py" ,
125121 "normal/file.txt" ,
126122 }
127- got , err := diff (`printf '"projects/test/pages/17_\360\237\252\201_testfile.py" normal /file.txt'` )
123+ got , err := diff (`printf '"projects/test/pages/17_\360\237\252\201_testfile.py"\nnormal /file.txt'` )
128124 assert .NoError (t , err )
129125 assert .Equal (t , want , got )
130126}
You can’t perform that action at this time.
0 commit comments