blob: aa270be7ba94f438a194a056e7aaa273c46f5369 [file] [log] [blame]
// Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <gtest/gtest.h>
#include "debugd/src/modem_status_tool.h"
namespace debugd {
class ModemStatusToolTest : public testing::Test {
protected:
static std::string CollapseNewLines(const std::string& input) {
return ModemStatusTool::CollapseNewLines(input);
}
};
TEST_F(ModemStatusToolTest, CollapseNewLines) {
EXPECT_EQ("", CollapseNewLines(""));
EXPECT_EQ(" \nATZ\nOK\n ERROR\n ",
CollapseNewLines(" \n\rATZ\rOK\r\n ERROR\n\r\n\r "));
}
} // namespace debugd