TEST_CASES

CONFIGURATION +

auto TEST_CASES = [testCase().inFolder("./00-basic-usage-default-command/").withParams("20").expectStatusToBe(0).finish(), testCase().inFolder("./00-basic-usage-default-command/").withParams("20 --reverse").expectStatusToBe(128).finish(), testCase().inFolder("./01-named-sub-commands/").withParams("return 0").expectStatusToBe(0).finish(), testCase().inFolder("./01-named-sub-commands/").withParams("r 128").expectStatusToBe(128).finish(), testCase().inFolder("./02-shorthand-longhand-args/").withParams("return --code 0").expectStatusToBe(0).finish(), testCase().inFolder("./02-shorthand-longhand-args/").withParams("r -c=128").expectStatusToBe(128).finish(), testCase().inFolder("./03-inheritence-base-commands/").withParams("add 1 2").expectStatusToBe(3).allowToFail().finish(), testCase().inFolder("./03-inheritence-base-commands/").withParams("add 1 2 --offset=7").expectStatusToBe(10).allowToFail().finish(), testCase().inFolder("./04-custom-arg-binders/").withParams("./dub.sdl").expectStatusToBe(0).finish(), testCase().inFolder("./04-custom-arg-binders/").withParams("./lalaland.txt").expectStatusToBe(-1).finish(), testCase().inFolder("./05-dependency-injection/").withParams("dman").expectStatusToBe(0).finish(), testCase().inFolder("./05-dependency-injection/").withParams("cman").expectStatusToBe(128).finish(), testCase().inFolder("./06-configuration").withParams("force exception").expectOutputToMatch("$^").cleanup("config.json").finish(), testCase().inFolder("./06-configuration").withParams("set verbose true").expectOutputToMatch("$^").finish(), testCase().inFolder("./06-configuration").withParams("set name Bradley").expectOutputToMatch(".*").finish(), testCase().inFolder("./06-configuration").withParams("force exception").expectOutputToMatch(".*").finish(), testCase().inFolder("./06-configuration").withParams("greet").expectOutputToMatch("Brad").finish(), testCase().inFolder("./07-text-buffer-table").withParams("fixed").expectStatusToBe(0).expectOutputToMatch("Age").finish(), testCase().inFolder("./07-text-buffer-table").withParams("dynamic").expectStatusToBe(0).expectOutputToMatch("Age").finish(), testCase().inFolder("./08-arg-binder-validation").withParams("20 69").expectStatusToBe(0).finish(), testCase().inFolder("./08-arg-binder-validation").withParams("69 69").expectStatusToBe(-1).expectOutputToMatch("Expected number to be even").finish(), testCase().inFolder("./08-arg-binder-validation").withParams("20 20").expectStatusToBe(-1).expectOutputToMatch("Expected number to be odd").finish(), testCase().inFolder("./09-raw-unparsed-arg-list").withParams("echo -- Some args").expectStatusToBe(0).expectOutputToMatch(`Running command 'echo' with arguments \["Some", "args"\]`).finish(), testCase().inFolder("./09-raw-unparsed-arg-list").withParams("noarg").expectStatusToBe(0).expectOutputToMatch(`Running command 'noarg' with arguments \[\]`).finish()];

Meta