diff --git a/tests/test_SupportedFileSystems.cc b/tests/test_SupportedFileSystems.cc index a5d61b6b..51177d18 100644 --- a/tests/test_SupportedFileSystems.cc +++ b/tests/test_SupportedFileSystems.cc @@ -314,12 +314,7 @@ const std::string SupportedFileSystemsTest::create_loopdev(const std::string& im return ""; } - // Strip trailing New Line. - size_t len = output.length(); - if (len > 0 && output[len-1] == '\n') - output.resize(len-1); - - return output; + return Utils::trim_trailing_new_line(output); }