Index: src/platform/update_engine/utils_unittest.cc |
diff --git a/src/platform/update_engine/utils_unittest.cc b/src/platform/update_engine/utils_unittest.cc |
index 5ab78cd228ea5a64cc54bc2caba0a835ea5bcc3a..a66e739d143d8167e74aeeb1e9c8a40a917caf12 100644 |
--- a/src/platform/update_engine/utils_unittest.cc |
+++ b/src/platform/update_engine/utils_unittest.cc |
@@ -125,4 +125,14 @@ TEST(UtilsTest, TempFilenameTest) { |
EXPECT_FALSE(utils::StringHasSuffix(result, "XXXXXX")); |
} |
+TEST(UtilsTest, RootDeviceTest) { |
+ EXPECT_EQ("/dev/sda", utils::RootDevice("/dev/sda3")); |
+ EXPECT_EQ("/dev/mmc0", utils::RootDevice("/dev/mmc0p3")); |
+} |
+ |
+TEST(UtilsTest, PartitionNumberTest) { |
+ EXPECT_EQ("3", utils::PartitionNumber("/dev/sda3")); |
+ EXPECT_EQ("3", utils::PartitionNumber("/dev/mmc0p3")); |
+} |
+ |
} // namespace chromeos_update_engine |