OLD | NEW |
(Empty) | |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import unittest |
| 6 |
| 7 from telemetry.core.backends import android_command_line_backend |
| 8 |
| 9 |
| 10 class AndroidCommandLineBackendTest(unittest.TestCase): |
| 11 |
| 12 def testQuoteIfNeededNoEquals(self): |
| 13 string = 'value' |
| 14 self.assertEqual(string, |
| 15 android_command_line_backend._QuoteIfNeeded(string)) |
| 16 |
| 17 def testQuoteIfNeededNoSpaces(self): |
| 18 string = 'key=valueA' |
| 19 self.assertEqual(string, |
| 20 android_command_line_backend._QuoteIfNeeded(string)) |
| 21 |
| 22 def testQuoteIfNeededAlreadyQuoted(self): |
| 23 string = "key='valueA valueB'" |
| 24 self.assertEqual(string, |
| 25 android_command_line_backend._QuoteIfNeeded(string)) |
| 26 |
| 27 def testQuoteIfNeeded(self): |
| 28 string = 'key=valueA valueB' |
| 29 expected_output = "key='valueA valueB'" |
| 30 self.assertEqual(expected_output, |
| 31 android_command_line_backend._QuoteIfNeeded(string)) |
OLD | NEW |