Skip to content

Commit

Permalink
test: #10 🚨 Add some more tests for sub task to verify arguments are …
Browse files Browse the repository at this point in the history
…handled correctly
  • Loading branch information
ddanier committed Apr 25, 2024
1 parent b2a3181 commit 542656b
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions nur-tests/nurfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,23 @@ def "nur test-invalid-executable" [] {
}
}

def "nur do-test-sub-task" [] { print "ok" }
def "nur do-test-sub-task sub" [] { print "sub-ok" }
def "nur do-sub-task" [] { print "ok" }
def "nur do-sub-task sub" [] { print "sub-ok" }
def "nur test-sub-task" [] {
std assert ((run-nur do-test-sub-task) == "ok")
std assert ((run-nur do-test-sub-task sub) == "sub-ok")
std assert ((run-nur do-sub-task) == "ok")
std assert ((run-nur do-sub-task sub) == "sub-ok")
}

def "nur do-test-sub-task-without-parent sub" [] { print "sub-ok" }
def "nur do-sub-task-without-parent sub" [] { print "sub-ok" }
def "nur test-sub-task-without-parent" [] {
std assert ((run-nur do-test-sub-task-without-parent sub) == "sub-ok")
std assert ((run-nur do-sub-task-without-parent sub) == "sub-ok")
}

def --wrapped "nur do-sub-task-with-any-args sub" [...args] { print "sub-ok" }
def "nur test-sub-task-with-any-args" [] {
std assert ((run-nur do-sub-task-with-any-args sub) == "sub-ok")
std assert ((run-nur do-sub-task-with-any-args sub --foo bar bla) == "sub-ok")
std assert ((run-nur do-sub-task-with-any-args sub some random args) == "sub-ok")
}

# Utils and other commands
Expand Down

0 comments on commit 542656b

Please sign in to comment.