Skip to content

Commit

Permalink
Add tests for val input
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrtalbot committed Mar 25, 2024
1 parent 03779fe commit a859781
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,6 @@ Tests moving a file within the working directory.

Tests moving the contents of a folder to a new folder within the working directory.

```
### `TEST_VAL_INPUT`

```
Test a process can accept a value as input.
34 changes: 33 additions & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,37 @@ process TEST_MV_FOLDER_CONTENTS {
"""
}

process TEST_STDOUT {
/*
This process should create and capture STDOUT
*/

output:
stdout

script:
"""
"""
}

process TEST_VAL_INPUT {
/*
This process should read in val and echo to STDOUT
*/


input:
val input

output:
stdout

script:
"""
echo $input
"""
}

workflow NF_CANARY {

main:
Expand All @@ -220,7 +251,8 @@ workflow NF_CANARY {
TEST_IGNORED_FAIL()
TEST_MV_FILE()
TEST_MV_FOLDER_CONTENTS()

TEST_VAL_INPUT("Hello World")

// POC of emitting the channel
Channel.empty()
.mix(
Expand Down

0 comments on commit a859781

Please sign in to comment.