-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test recipe outputs_overwrite_base_file
Signed-off-by: Marcel Bargull <[email protected]>
- Loading branch information
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
tests/test-recipes/metadata/outputs_overwrite_base_file/install.bat
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,2 @@ | ||
:: Always output 4 characters to properly test even if "SafetyError: ... incorrect size." is not triggered. | ||
< nul set /p="%PKG_NAME:~0,4%" > "%PREFIX%\file" & call; |
2 changes: 2 additions & 0 deletions
2
tests/test-recipes/metadata/outputs_overwrite_base_file/install.sh
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,2 @@ | ||
## Always output 4 characters to properly test even if "SafetyError: ... incorrect size." is not triggered. | ||
printf '%.4s' "${PKG_NAME}" > "${PREFIX}/file" |
40 changes: 40 additions & 0 deletions
40
tests/test-recipes/metadata/outputs_overwrite_base_file/meta.yaml
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,40 @@ | ||
{% set name = "outputs_overwrite_base_file" %} | ||
|
||
package: | ||
name: {{ name }} | ||
version: 1.0 | ||
|
||
outputs: | ||
- name: base-{{ name }} | ||
script: install.sh # [unix] | ||
script: install.bat # [win] | ||
|
||
- name: first-{{ name }} | ||
script: install.sh # [unix] | ||
script: install.bat # [win] | ||
requirements: | ||
host: | ||
- {{ pin_subpackage("base-" + name) }} | ||
run: | ||
- {{ pin_subpackage("base-" + name) }} | ||
test: | ||
commands: | ||
- content="$(cat "${PREFIX}/file")" # [unix] | ||
- test "${content}" = base # [unix] | ||
- < "%PREFIX%\file% set /p content= # [win] | ||
- if not "%content%" == "base" exit 1 # [win] | ||
|
||
- name: second-{{ name }} | ||
script: install.sh # [unix] | ||
script: install.bat # [win] | ||
requirements: | ||
host: | ||
- {{ pin_subpackage("base-" + name) }} | ||
run: | ||
- {{ pin_subpackage("base-" + name) }} | ||
test: | ||
commands: | ||
- content="$(cat "${PREFIX}/file")" # [unix] | ||
- test "${content}" = "base" # [unix] | ||
- < "%PREFIX%\file% set /p content= # [win] | ||
- if not "%content%" == "base" exit 1 # [win] |