1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-28 02:34:27 +01:00

updating CLI for unity_fixture.h to handle unknown command line arguments (instead of entering an infinite loop)

This commit is contained in:
James Hood
2013-03-04 14:35:18 -06:00
parent b8d47ff2a3
commit 5e401afa83
3 changed files with 21 additions and 0 deletions

View File

@@ -255,6 +255,23 @@ TEST(UnityCommandOptions, MultipleOptionsDashRNotLastAndNoValueSpecified)
TEST_ASSERT_EQUAL(2, UnityFixture.RepeatCount);
}
static char* unknownCommand[] = {
"testrunner.exe",
"-v",
"-g", "groupname",
"-n", "testname",
"-r", "98",
"-z"
};
TEST(UnityCommandOptions, UnknownCommandIsIgnored)
{
TEST_ASSERT_EQUAL(0, UnityGetCommandLineOptions(9, unknownCommand));
TEST_ASSERT_EQUAL(1, UnityFixture.Verbose);
STRCMP_EQUAL("groupname", UnityFixture.GroupFilter);
STRCMP_EQUAL("testname", UnityFixture.NameFilter);
TEST_ASSERT_EQUAL(98, UnityFixture.RepeatCount);
}
//------------------------------------------------------------