mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Revert "Fix dockerfile parser with empty line after escape"
This reverts commit 3e1b539e8d
.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
a756c1ac65
commit
6e0666e622
11 changed files with 24 additions and 70 deletions
|
@ -150,8 +150,8 @@ func TestLineInformation(t *testing.T) {
|
|||
t.Fatalf("Error parsing dockerfile %s: %v", testFileLineInfo, err)
|
||||
}
|
||||
|
||||
if ast.StartLine != 5 || ast.EndLine != 27 {
|
||||
fmt.Fprintf(os.Stderr, "Wrong root line information: expected(%d-%d), actual(%d-%d)\n", 5, 27, ast.StartLine, ast.EndLine)
|
||||
if ast.StartLine != 5 || ast.EndLine != 31 {
|
||||
fmt.Fprintf(os.Stderr, "Wrong root line information: expected(%d-%d), actual(%d-%d)\n", 5, 31, ast.StartLine, ast.EndLine)
|
||||
t.Fatalf("Root line information doesn't match result.")
|
||||
}
|
||||
if len(ast.Children) != 3 {
|
||||
|
@ -161,7 +161,7 @@ func TestLineInformation(t *testing.T) {
|
|||
expected := [][]int{
|
||||
{5, 5},
|
||||
{11, 12},
|
||||
{17, 27},
|
||||
{17, 31},
|
||||
}
|
||||
for i, child := range ast.Children {
|
||||
if child.StartLine != expected[i][0] || child.EndLine != expected[i][1] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue