[gnote] Remove temp files created by files tests
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Remove temp files created by files tests
- Date: Mon, 6 Apr 2020 17:18:39 +0000 (UTC)
commit 0e6b25db49721ddcf6ccc0a85fec9e71814135d8
Author: Aurimas Černius <aurisc4 gmail com>
Date: Mon Apr 6 20:18:15 2020 +0300
Remove temp files created by files tests
src/test/unit/filesutests.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/test/unit/filesutests.cpp b/src/test/unit/filesutests.cpp
index fe76c6d1..ba3d1517 100644
--- a/src/test/unit/filesutests.cpp
+++ b/src/test/unit/filesutests.cpp
@@ -1,7 +1,7 @@
/*
* gnote
*
- * Copyright (C) 2017-2019 Aurimas Cernius
+ * Copyright (C) 2017-2020 Aurimas Cernius
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -94,6 +94,8 @@ SUITE(files)
CHECK_EQUAL("line1", lines[0]);
CHECK_EQUAL("line2", lines[1]);
CHECK_EQUAL("line3", lines[2]);
+
+ std::remove(temp_file_name);
}
TEST(read_all_text)
@@ -115,6 +117,8 @@ SUITE(files)
file_content = sharp::file_read_all_text(temp_file_name);
CHECK_EQUAL("line1\nline2\nline3", file_content);
+
+ std::remove(temp_file_name);
}
TEST(read_all_text_gio)
@@ -135,6 +139,8 @@ SUITE(files)
file_content = sharp::file_read_all_text(file);
CHECK_EQUAL("line1\nline2\nline3", file_content);
+
+ std::remove(temp_file_name);
}
TEST(write_all_text)
@@ -157,6 +163,8 @@ SUITE(files)
CHECK_EQUAL("line3", line3);
CHECK_THROW(sharp::file_write_all_text("/usr/gnotetest", file_content), sharp::Exception);
+
+ std::remove(temp_file_name);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]