Skip to content

Commit

Permalink
Added additional test case
Browse files Browse the repository at this point in the history
  • Loading branch information
apetkau committed Jun 3, 2024
1 parent 0e85c66 commit e5a7570
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/data/tables/missing_all_headers_single_line.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stuff1,stuff2,stuff3
24 changes: 24 additions & 0 deletions tests/functions/report.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,30 @@ nextflow_function {
}
}

test("Missing all column headers, only single line"){
tag "missing_all_column_headers_single_line"

when {
function {
"""
input[0] = file("$baseDir/tests/data/tables/missing_all_headers_single_line.csv")
input[1] = true
input[2] = ','
input[3] = null
"""
}
params {
outdir = "results"
}
}
then{
assert function.success
// When headers are supposed to exist in the file, but only a single line of values
// will assume first line is headers
assert function.result == ['0':['stuff1':'NoData', 'stuff2':'NoData', 'stuff3':'NoData']]
}
}

test("Missing all values"){
tag "missing_all_values"

Expand Down

0 comments on commit e5a7570

Please sign in to comment.