Permalink
Browse files

Test empty bodies against ZSH too.

Unrelated: move 'import re'.
  • Loading branch information...
Andy Chu
Andy Chu committed May 28, 2018
1 parent 57187b4 commit 2d2e322403e2fd74f9b2bd1dca67001418ec7326
Showing with 5 additions and 3 deletions.
  1. +2 −1 core/cmd_exec.py
  2. +1 −0 core/lexer.py
  3. +1 −1 spec/empty-bodies.test.sh
  4. +1 −1 test/spec.sh
View
@@ -16,6 +16,8 @@
"""
import os
# Used to test whether we should repr() escape
import re
import resource
import sys
import time
@@ -1527,7 +1529,6 @@ def Event(self):
# NOTE: bash prints \' for single quote, repr() prints "'". Gah. This is also
# used for printf %q and ${var@q} (bash 4.4).
import re
_PLAIN_RE = re.compile(r'^[a-zA-Z0-9\-_./]+$')
def _PrettyString(s):
View
@@ -9,6 +9,7 @@
lexer.py - Library for lexing.
"""
# CompileAll() used for SimpleLexer
import re
from asdl import const
@@ -14,7 +14,7 @@ esac
echo empty
# stdout: empty
### empty then/fi
### Empty then/fi
if foo; then
fi
echo empty
View
@@ -551,7 +551,7 @@ for-expr() {
}
empty-bodies() {
sh-spec spec/empty-bodies.test.sh "${REF_SHELLS[@]}" $OSH
sh-spec spec/empty-bodies.test.sh "${REF_SHELLS[@]}" $ZSH $OSH
}
# TODO: This is for the ANTLR grammars, in the oil-sketch repo.

0 comments on commit 2d2e322

Please sign in to comment.