1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

- Fixed cases with wildcards in file handling.

This commit is contained in:
Mark VanderVoord
2016-07-17 19:11:09 -04:00
parent 1cecab30e8
commit 57676b5edc
3 changed files with 152 additions and 4 deletions

View File

@@ -774,6 +774,82 @@ RUNNER_TESTS = [
}
},
{ :name => 'ArgsNameFilterWithWildcardOnFile',
:testfile => 'testdata/testRunnerGeneratorSmall.c',
:testdefines => ['TEST', 'UNITY_USE_COMMAND_LINE_ARGS'],
:options => {
:cmdline_args => true,
},
:cmdline_args => "-n testRunnerGeneratorSma*",
:expected => {
:to_pass => [ 'test_ThisTestAlwaysPasses',
'spec_ThisTestPassesWhenNormalSetupRan',
'spec_ThisTestPassesWhenNormalTeardownRan' ],
:to_fail => [ 'test_ThisTestAlwaysFails' ],
:to_ignore => [ 'test_ThisTestAlwaysIgnored' ],
}
},
{ :name => 'ArgsNameFilterWithWildcardAsName',
:testfile => 'testdata/testRunnerGeneratorSmall.c',
:testdefines => ['TEST', 'UNITY_USE_COMMAND_LINE_ARGS'],
:options => {
:cmdline_args => true,
},
:cmdline_args => "-n testRunnerGeneratorSmall:*",
:expected => {
:to_pass => [ 'test_ThisTestAlwaysPasses',
'spec_ThisTestPassesWhenNormalSetupRan',
'spec_ThisTestPassesWhenNormalTeardownRan' ],
:to_fail => [ 'test_ThisTestAlwaysFails' ],
:to_ignore => [ 'test_ThisTestAlwaysIgnored' ],
}
},
{ :name => 'ArgsNameFilterWithWildcardOnName',
:testfile => 'testdata/testRunnerGeneratorSmall.c',
:testdefines => ['TEST', 'UNITY_USE_COMMAND_LINE_ARGS'],
:options => {
:cmdline_args => true,
},
:cmdline_args => "-n testRunnerGeneratorSmall:test_*",
:expected => {
:to_pass => [ 'test_ThisTestAlwaysPasses' ],
:to_fail => [ 'test_ThisTestAlwaysFails' ],
:to_ignore => [ 'test_ThisTestAlwaysIgnored' ],
}
},
{ :name => 'ArgsNameFilterWithWildcardAndShortName',
:testfile => 'testdata/testRunnerGeneratorSmall.c',
:testdefines => ['TEST', 'UNITY_USE_COMMAND_LINE_ARGS'],
:options => {
:cmdline_args => true,
},
:cmdline_args => "-n testRunnerGeneratorSmall:te*",
:expected => {
:to_pass => [ 'test_ThisTestAlwaysPasses' ],
:to_fail => [ 'test_ThisTestAlwaysFails' ],
:to_ignore => [ 'test_ThisTestAlwaysIgnored' ],
}
},
{ :name => 'ArgsNameFilterWithWildcardOnBoth',
:testfile => 'testdata/testRunnerGeneratorSmall.c',
:testdefines => ['TEST', 'UNITY_USE_COMMAND_LINE_ARGS'],
:options => {
:cmdline_args => true,
},
:cmdline_args => "-n testRunnerGeneratorSm*:*",
:expected => {
:to_pass => [ 'test_ThisTestAlwaysPasses',
'spec_ThisTestPassesWhenNormalSetupRan',
'spec_ThisTestPassesWhenNormalTeardownRan' ],
:to_fail => [ 'test_ThisTestAlwaysFails' ],
:to_ignore => [ 'test_ThisTestAlwaysIgnored' ],
}
},
{ :name => 'ArgsExcludeFilterJustTest',
:testfile => 'testdata/testRunnerGenerator.c',
:testdefines => ['TEST', 'UNITY_USE_COMMAND_LINE_ARGS'],