summaryrefslogtreecommitdiff
path: root/src/test/test-env-replace.c
AgeCommit message (Collapse)Author
2013-02-11tests: more testsThomas Hindoe Paaboel Andersen
tests for: parse_boolean env_name_is_valid Also convert assert to assert_se to make sure they are run even with optimization. (see commit 9b5d6bd909855543cba75a4469bff6f82845cf0d)
2013-02-11test-env-replace: better user assert_se() everywhereLennart Poettering
For test tools it's better to use assert_se() rather than assert(), since the former is not optimized away, even if -DNDEBUG is used. That means the test program now retains its usefulness even if -DNDEBUG is used. This also adds in some OOM checks, to be extra anal...
2013-02-11env: considerably beef up environment cleaning logicLennart Poettering
Now, actually check if the environment variable names and values used are valid, before accepting them. With this in place are at some places more rigid than POSIX, and less rigid at others. For example, this code allows lower-case environment variables (which POSIX suggests not to use), but it will not allow non-UTF8 variable values. All in all this should be a good middle ground of what to allow and what not to allow as environment variables. (This also splits out all environment related calls into env-util.[ch])
2013-02-08tests: add more testsThomas Hindoe Paaboel Andersen
Adds tests of: strv_env_delete strv_env_unset strv_env_set
2013-02-07test-env-replace: assert results instead of printing themThomas Hindoe Paaboel Andersen
Also code cleanup and split into functions in preparation for more tests to come.
2013-02-07tests: move strv_parse_nulstr to test-strv, and actually test itThomas Hindoe Paaboel Andersen
The test was originally added with this commit message: "ask-password: supported plymouth cached passwords"
2013-02-07strv: add strv_printThomas Hindoe Paaboel Andersen
Clearer, and spares the temp variable.
2012-09-19util: fix bad strstrip() return value in normalize_env_assignment()Lennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=858780
2012-04-12test: test tools should still be in the src/ directoryLennart Poettering