summaryrefslogtreecommitdiff
path: root/test/libapt
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-12-28 00:31:01 +0100
committerMichael Vogt <mvo@debian.org>2013-12-28 00:31:01 +0100
commit35ac30ee373c5ed84d7c2c5a701ac2d54963504d (patch)
tree59da7e2385b396052c4f53ac187d520c00d2790c /test/libapt
parente5c2b7e8a5455e1dc6993ef9e151b3845fb53c60 (diff)
parentc035b6552ba4bd1c6fba5fd8f8d829c2efbefe3c (diff)
Merge branch 'debian/sid' into bugfix/bts731738-fancy-progess
Conflicts: apt-pkg/install-progress.cc
Diffstat (limited to 'test/libapt')
-rw-r--r--test/libapt/fileutl_test.cc13
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;
}