Remove temp files left from unit tests.
This patch removes a few files that weren't removed by the test case
after completion. These files should go in the temp directory and not
next to it.
BUG=None
TEST=run `ls /tmp | wc` before and after unittests. No change.
Change-Id: I585bedbd9d939afdc087d6623076cbe152335de9
Reviewed-on: https://chromium-review.googlesource.com/201001
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/utils_unittest.cc b/utils_unittest.cc
index 3103349..3a4ec6a 100644
--- a/utils_unittest.cc
+++ b/utils_unittest.cc
@@ -187,9 +187,9 @@
TEST(UtilsTest, IsSymlinkTest) {
string temp_dir;
EXPECT_TRUE(utils::MakeTempDirectory("symlink-test.XXXXXX", &temp_dir));
- string temp_file = temp_dir + "temp-file";
+ string temp_file = temp_dir + "/temp-file";
EXPECT_TRUE(utils::WriteFile(temp_file.c_str(), "", 0));
- string temp_symlink = temp_dir + "temp-symlink";
+ string temp_symlink = temp_dir + "/temp-symlink";
EXPECT_EQ(0, symlink(temp_file.c_str(), temp_symlink.c_str()));
EXPECT_FALSE(utils::IsSymlink(temp_dir.c_str()));
EXPECT_FALSE(utils::IsSymlink(temp_file.c_str()));
@@ -201,9 +201,9 @@
TEST(UtilsTest, IsDirTest) {
string temp_dir;
EXPECT_TRUE(utils::MakeTempDirectory("isdir-test.XXXXXX", &temp_dir));
- string temp_file = temp_dir + "temp-file";
+ string temp_file = temp_dir + "/temp-file";
EXPECT_TRUE(utils::WriteFile(temp_file.c_str(), "", 0));
- string temp_symlink = temp_dir + "temp-symlink";
+ string temp_symlink = temp_dir + "/temp-symlink";
EXPECT_EQ(0, symlink(temp_dir.c_str(), temp_symlink.c_str()));
EXPECT_TRUE(utils::IsDir(temp_dir.c_str()));
EXPECT_FALSE(utils::IsDir(temp_file.c_str()));