diff options
author | Michael Vogt <mvo@debian.org> | 2014-01-04 11:15:28 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-01-04 11:15:28 +0100 |
commit | c93d14fc05b50a8ee8bb7804579c2912f34c676b (patch) | |
tree | 1f45c51bd8d3ab33de2610f1663b3ec8e5f49c02 /test/libapt | |
parent | e2fa0aa64d2249129543f82a213043d96469be1c (diff) | |
parent | 23bd09778261c945b460b46d855b1a6ef998cfd8 (diff) |
Merge branch 'debian/sid' into feature/source-deb822
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; } |