Permalink
Browse files
Fix unit tests broken in last change.
- Loading branch information...
Showing
with
9 additions
and
6 deletions.
-
+0
−6
core/builtin_test.py
-
+9
−0
osh/lex_test.py
|
|
@@ -12,12 +12,6 @@ |
|
|
|
|
|
class BuiltinTest(unittest.TestCase):
|
|
|
|
|
|
def testEchoLexer(self):
|
|
|
lex = builtin.ECHO_LEXER
|
|
|
print(list(lex.Tokens(r'newline \n NUL \0 octal \0377 hex \x00')))
|
|
|
print(list(lex.Tokens(r'unicode \u0065 \U00000065')))
|
|
|
print(list(lex.Tokens(r'\d \e \f \g')))
|
|
|
|
|
|
def testAppendParts(self):
|
|
|
# allow_escape is True by default, but False when the user passes -r.
|
|
|
CASES = [
|
|
|
|
|
|
@@ -244,5 +244,14 @@ def testDoubleQuoted(self): |
|
|
print(nul_pat.match('\0'))
|
|
|
|
|
|
|
|
|
class EchoLexerTest(unittest.TestCase):
|
|
|
|
|
|
def testEchoLexer(self):
|
|
|
lex = match.ECHO_LEXER
|
|
|
print(list(lex.Tokens(r'newline \n NUL \0 octal \0377 hex \x00')))
|
|
|
print(list(lex.Tokens(r'unicode \u0065 \U00000065')))
|
|
|
print(list(lex.Tokens(r'\d \e \f \g')))
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
unittest.main()
|
0 comments on commit
4fb0bac