diff options
author | Michael Vogt <mvo@debian.org> | 2013-12-29 16:04:42 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-12-29 16:04:42 +0100 |
commit | f99a02461efe5183a00d5e73da197b85f93cf57a (patch) | |
tree | 1286d59d9700b4626111347bce45820a7cad6aba /test/libapt | |
parent | a127de147900050d3dbc3644ed468428749c46fd (diff) | |
parent | 23bd09778261c945b460b46d855b1a6ef998cfd8 (diff) |
Merge remote-tracking branch 'mvo/debian/sid' into debian/sid
Diffstat (limited to 'test/libapt')
-rw-r--r-- | test/libapt/fileutl_test.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc index b6b8ac579..462bdefd9 100644 --- a/test/libapt/fileutl_test.cc +++ b/test/libapt/fileutl_test.cc @@ -38,5 +38,18 @@ int main(int argc,char *argv[]) return 1; } + // GetTempDir() + unsetenv("TMPDIR"); + equals(GetTempDir(), "/tmp"); + + setenv("TMPDIR", "", 1); + equals(GetTempDir(), "/tmp"); + + setenv("TMPDIR", "/not-there-no-really-not", 1); + equals(GetTempDir(), "/tmp"); + + setenv("TMPDIR", "/usr", 1); + equals(GetTempDir(), "/usr"); + return 0; } |