mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug #1251
- #1251 tests should sanitize TASKDATA and TASKRC env vars (thanks to Jakub Wilk).
This commit is contained in:
parent
a295ddce2d
commit
ada6e49dab
241 changed files with 985 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <cmake.h>
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <Context.h>
|
||||
#include <Color.h>
|
||||
#include <test.h>
|
||||
|
@ -38,6 +39,10 @@ int main (int argc, char** argv)
|
|||
{
|
||||
UnitTest t (1036);
|
||||
|
||||
// Ensure environment has no influence.
|
||||
unsetenv ("TASKDATA");
|
||||
unsetenv ("TASKRC");
|
||||
|
||||
// Names matched to values.
|
||||
t.is ((int) Color (""), (int) Color (Color::nocolor), "'' == Color::nocolor");
|
||||
t.is ((int) Color ("black"), (int) Color (Color::black), "'black' == Color::black");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue