Mark erroring tests

This commit is contained in:
Padraic Fanning committed 2021-05-07 16:20:10 -04:00
1 parent 266a1e68c0
commit 839632288a
1 file changed
+32
+32
View File
@@ -162,10 +162,14 @@ class ShlexTest(unittest.TestCase):
tok = lex.get_token()
return ret
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testSplitPosix(self):
"""Test data splitting with posix parser"""
self.splitTest(self.posix_data, comments=True)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testCompat(self):
"""Test compatibility interface"""
for i in range(len(self.data)):
@@ -174,6 +178,8 @@ class ShlexTest(unittest.TestCase):
"%s: %s != %s" %
(self.data[i][0], l, self.data[i][1:]))
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testSyntaxSplitAmpersandAndPipe(self):
"""Test handling of syntax splitting of &, |"""
# Could take these forms: &&, &, |&, ;&, ;;&
@@ -191,6 +197,8 @@ class ShlexTest(unittest.TestCase):
self.assertEqual(ref, result,
"While splitting '%s' [ws=%s]" % (ss, ws))
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testSyntaxSplitSemicolon(self):
"""Test handling of syntax splitting of ;"""
# Could take these forms: ;, ;;, ;&, ;;&
@@ -207,6 +215,8 @@ class ShlexTest(unittest.TestCase):
self.assertEqual(ref, result,
"While splitting '%s' [ws=%s]" % (ss, ws))
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testSyntaxSplitRedirect(self):
"""Test handling of syntax splitting of >"""
# of course, the same applies to <, |
@@ -222,6 +232,8 @@ class ShlexTest(unittest.TestCase):
self.assertEqual(ref, result,
"While splitting '%s' [ws=%s]" % (ss, ws))
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testSyntaxSplitParen(self):
"""Test handling of syntax splitting of ()"""
# these should all parse to the same output
@@ -235,6 +247,8 @@ class ShlexTest(unittest.TestCase):
self.assertEqual(ref, result,
"While splitting '%s' [ws=%s]" % (ss, ws))
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testSyntaxSplitCustom(self):
"""Test handling of syntax splitting with custom chars"""
ss = "~/a&&b-c --color=auto||d *.py?"
@@ -248,6 +262,8 @@ class ShlexTest(unittest.TestCase):
result = list(s)
self.assertEqual(ref, result, "While splitting '%s' [ws=True]" % ss)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testTokenTypes(self):
"""Test that tokens are split with types as expected."""
for source, expected in (
@@ -268,12 +284,16 @@ class ShlexTest(unittest.TestCase):
observed.append((t, tt))
self.assertEqual(observed, expected)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testPunctuationInWordChars(self):
"""Test that any punctuation chars are removed from wordchars"""
s = shlex.shlex('a_b__c', punctuation_chars='_')
self.assertNotIn('_', s.wordchars)
self.assertEqual(list(s), ['a', '_', 'b', '__', 'c'])
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testPunctuationWithWhitespaceSplit(self):
"""Test that with whitespace_split, behaviour is as expected"""
s = shlex.shlex('a && b || c', punctuation_chars='&')
@@ -286,6 +306,8 @@ class ShlexTest(unittest.TestCase):
# white space
self.assertEqual(list(s), ['a', '&&', 'b', '||', 'c'])
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testPunctuationWithPosix(self):
"""Test that punctuation_chars and posix behave correctly together."""
# see Issue #29132
@@ -294,6 +316,8 @@ class ShlexTest(unittest.TestCase):
s = shlex.shlex('f >\\"abc\\"', posix=True, punctuation_chars=True)
self.assertEqual(list(s), ['f', '>', '"abc"'])
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testEmptyStringHandling(self):
"""Test that parsing of empty strings is correctly handled."""
# see Issue #21999
@@ -306,6 +330,8 @@ class ShlexTest(unittest.TestCase):
s = shlex.shlex("'')abc", punctuation_chars=True)
self.assertEqual(list(s), expected)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testUnicodeHandling(self):
"""Test punctuation_chars and whitespace_split handle unicode."""
ss = "\u2119\u01b4\u2602\u210c\u00f8\u1f24"
@@ -334,6 +360,8 @@ class ShlexTest(unittest.TestCase):
self.assertEqual(shlex.quote("test%s'name'" % u),
"'test%s'\"'\"'name'\"'\"''" % u)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testJoin(self):
for split_command, command in [
(['a ', 'b'], "'a ' b"),
@@ -345,6 +373,8 @@ class ShlexTest(unittest.TestCase):
joined = shlex.join(split_command)
self.assertEqual(joined, command)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testJoinRoundtrip(self):
all_data = self.data + self.posix_data
for command, *split_command in all_data:
@@ -353,6 +383,8 @@ class ShlexTest(unittest.TestCase):
resplit = shlex.split(joined)
self.assertEqual(split_command, resplit)
# TODO: RUSTPYTHON
@unittest.expectedFailure
def testPunctuationCharsReadOnly(self):
punctuation_chars = "/|$%^"
shlex_instance = shlex.shlex(punctuation_chars=punctuation_chars)