[gparted] Add clearing FS label to CreateAndWriteLabel unit test
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Add clearing FS label to CreateAndWriteLabel unit test
- Date: Mon, 4 Jul 2022 18:09:41 +0000 (UTC)
commit a46c0cbe8052aa2ef4521dea4db08f2dc71a80ea
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Mon Jun 20 20:47:38 2022 +0100
Add clearing FS label to CreateAndWriteLabel unit test
For FAT16/32 and XFS file systems clearing the label uses different
command options and code path in file system specific ::write_label()
method. Therefore extend this unit test to also test clearing the
label.
tests/test_SupportedFileSystems.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/tests/test_SupportedFileSystems.cc b/tests/test_SupportedFileSystems.cc
index f08b29b8..8b4d44a6 100644
--- a/tests/test_SupportedFileSystems.cc
+++ b/tests/test_SupportedFileSystems.cc
@@ -596,7 +596,11 @@ TEST_P(SupportedFileSystemsTest, CreateAndWriteLabel)
m_partition.set_filesystem_label("FIRST");
ASSERT_TRUE(m_fs_object->create(m_partition, m_operation_detail)) << m_operation_detail;
- // Test writing a label is successful.
+ // Test clearing the label is successful.
+ m_partition.set_filesystem_label("");
+ ASSERT_TRUE(m_fs_object->write_label(m_partition, m_operation_detail)) << m_operation_detail;
+
+ // Test writing the label is successful.
m_partition.set_filesystem_label("SECOND");
ASSERT_TRUE(m_fs_object->write_label(m_partition, m_operation_detail)) << m_operation_detail;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]