summaryrefslogtreecommitdiff
path: root/tools/scan-build-py/tests/unit/test_shell.py
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 17:59:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 17:59:23 +0000
commit9a83721404652cea39e9f02ae3e3b5c964602a5c (patch)
tree23e9541ce27049a103f6ed046be61592123e02c9 /tools/scan-build-py/tests/unit/test_shell.py
parent676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (diff)
Notes
Diffstat (limited to 'tools/scan-build-py/tests/unit/test_shell.py')
-rw-r--r--tools/scan-build-py/tests/unit/test_shell.py42
1 files changed, 0 insertions, 42 deletions
diff --git a/tools/scan-build-py/tests/unit/test_shell.py b/tools/scan-build-py/tests/unit/test_shell.py
deleted file mode 100644
index a2904b07f5bcf..0000000000000
--- a/tools/scan-build-py/tests/unit/test_shell.py
+++ /dev/null
@@ -1,42 +0,0 @@
-# -*- coding: utf-8 -*-
-# The LLVM Compiler Infrastructure
-#
-# This file is distributed under the University of Illinois Open Source
-# License. See LICENSE.TXT for details.
-
-import libscanbuild.shell as sut
-import unittest
-
-
-class ShellTest(unittest.TestCase):
-
- def test_encode_decode_are_same(self):
- def test(value):
- self.assertEqual(sut.encode(sut.decode(value)), value)
-
- test("")
- test("clang")
- test("clang this and that")
-
- def test_decode_encode_are_same(self):
- def test(value):
- self.assertEqual(sut.decode(sut.encode(value)), value)
-
- test([])
- test(['clang'])
- test(['clang', 'this', 'and', 'that'])
- test(['clang', 'this and', 'that'])
- test(['clang', "it's me", 'again'])
- test(['clang', 'some "words" are', 'quoted'])
-
- def test_encode(self):
- self.assertEqual(sut.encode(['clang', "it's me", 'again']),
- 'clang "it\'s me" again')
- self.assertEqual(sut.encode(['clang', "it(s me", 'again)']),
- 'clang "it(s me" "again)"')
- self.assertEqual(sut.encode(['clang', 'redirect > it']),
- 'clang "redirect > it"')
- self.assertEqual(sut.encode(['clang', '-DKEY="VALUE"']),
- 'clang -DKEY=\\"VALUE\\"')
- self.assertEqual(sut.encode(['clang', '-DKEY="value with spaces"']),
- 'clang -DKEY=\\"value with spaces\\"')