summaryrefslogtreecommitdiffstats
path: root/src/test/test-env-replace.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tests: rename test-env-replace to test-env-utilZbigniew Jędrzejewski-Szmek2016-03-211-194/+0
|
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering2015-10-241-2/+3
| | | | | | | | | | | | | | string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
* basic: fix env expansion for strings leading with two dollar signsMichal Schmidt2015-10-071-1/+5
| | | | | The way to escape a literal dollar sign is to write "$$". But this does not work right if it's at the beginning of the argument. Fix it.
* util: remove normalize_env_assignment(), it's unusedLennart Poettering2015-04-101-26/+0
|
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-1/+0
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* tests: more testsThomas Hindoe Paaboel Andersen2013-02-111-0/+10
| | | | | | | | | 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)
* test-env-replace: better user assert_se() everywhereLennart Poettering2013-02-111-43/+58
| | | | | | | | | 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...
* env: considerably beef up environment cleaning logicLennart Poettering2013-02-111-4/+40
| | | | | | | | | | | | | 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])
* tests: add more testsThomas Hindoe Paaboel Andersen2013-02-081-0/+43
| | | | | | | Adds tests of: strv_env_delete strv_env_unset strv_env_set
* test-env-replace: assert results instead of printing themThomas Hindoe Paaboel Andersen2013-02-071-75/+60
| | | | | Also code cleanup and split into functions in preparation for more tests to come.
* tests: move strv_parse_nulstr to test-strv, and actually test itThomas Hindoe Paaboel Andersen2013-02-071-9/+1
| | | | | The test was originally added with this commit message: "ask-password: supported plymouth cached passwords"
* strv: add strv_printThomas Hindoe Paaboel Andersen2013-02-071-9/+3
| | | | Clearer, and spares the temp variable.
* util: fix bad strstrip() return value in normalize_env_assignment()Lennart Poettering2012-09-191-0/+16
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=858780
* test: test tools should still be in the src/ directoryLennart Poettering2012-04-121-0/+127