-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix erroneous messages printed about pre-existing files after run fin…
…ished
- Loading branch information
Showing
7 changed files
with
78 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rm -rf .bpipe test.*.csv test.*.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
source ../testsupport.sh | ||
|
||
set -e | ||
|
||
bpipe run test2.groovy test.txt > test.out | ||
|
||
grep -q 'Output is test.hello.csv' test.out || err "did not print expected message about output" | ||
grep -q 'pre-existing' test.out && err "printed output as pre-existing when not" | ||
|
||
bpipe run -p worldy=true test2.groovy test.txt > test2.out | ||
|
||
grep -q 'Outputs are:' test2.out || err "did not print expected message about output" | ||
grep -q 'test.world.xml' test2.out || err "did not print expected message about output file" | ||
grep -q 'xml.*pre-existing' test2.out && err "printed output as pre-existing when not" | ||
grep -q 'csv.*pre-existing' test2.out || err "did not print CSV outout as pre-existing when it was" | ||
|
||
true | ||
|
||
|
||
|
||
|
||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
hello = { | ||
exec """ | ||
cp $input.txt $output.xml | ||
""" | ||
} | ||
|
||
run { | ||
hello | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
hello = { | ||
exec """ | ||
cp $input.txt $output.csv | ||
""" | ||
} | ||
|
||
world = { | ||
var worldy: false | ||
|
||
if(worldy) { | ||
exec """ | ||
cp $input.txt $output.xml | ||
""" | ||
} | ||
} | ||
|
||
run { | ||
hello + world | ||
} | ||
|