Bug #1251
- #1251 tests should sanitize TASKDATA and TASKRC env vars (thanks to Jakub Wilk).
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <cmake.h>
|
||||
#include <stdlib.h>
|
||||
#include <main.h>
|
||||
#include <test.h>
|
||||
|
||||
@@ -36,6 +37,10 @@ int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest test (30);
|
||||
|
||||
// Ensure environment has no influence.
|
||||
unsetenv ("TASKDATA");
|
||||
unsetenv ("TASKRC");
|
||||
|
||||
test.is ((int)Task::textToStatus ("pending"), (int)Task::pending, "textToStatus pending");
|
||||
test.is ((int)Task::textToStatus ("completed"), (int)Task::completed, "textToStatus completed");
|
||||
test.is ((int)Task::textToStatus ("deleted"), (int)Task::deleted, "textToStatus deleted");
|
||||
|
||||
Reference in New Issue
Block a user