am 5f509c78: am da60a30b: Merge "Add a test for shell escaping."

* commit '5f509c78cb9786980084f31b1629663d464656e4':
  Add a test for shell escaping.
This commit is contained in:
Elliott Hughes 2015-04-21 23:03:22 +00:00 committed by Android Git Automerger
commit 17441d879d
1 changed files with 8 additions and 0 deletions

View File

@ -267,6 +267,14 @@ class AdbBasic(unittest.TestCase):
adb.unroot()
adb.wait()
def test_argument_escaping(self):
"""Make sure that argument escaping is somewhat sane."""
adb = AdbWrapper()
# http://b/19734868
result = adb.shell("sh -c 'echo hello; echo world'").splitlines()
self.assertEqual(["hello", "world"], result)
class AdbFile(unittest.TestCase):
SCRATCH_DIR = "/data/local/tmp"