Added test case covering unexpected whitespaces in SAS file.

This commit is contained in:
Patrick Lühne 2016-08-30 18:47:12 +02:00
parent 28b9d22a4c
commit b4f7e4f102
2 changed files with 276 additions and 0 deletions

View File

@ -177,3 +177,11 @@ TEST_F(SASParserTests, ParseRequirements)
FAIL() << e.what(); FAIL() << e.what();
} }
} }
////////////////////////////////////////////////////////////////////////////////////////////////////
TEST_F(SASParserTests, CheckIssues)
{
// Check issue where unexpected whitespaces in SAS files led to a parsing error
ASSERT_NO_THROW(plasp::sas::Description::fromFile("data/issues/issue-6.sas"));
}

View File

@ -0,0 +1,268 @@
begin_version
3
end_version
begin_metric
0
end_metric
7
begin_variable
var0
-1
2
Atom counter-at-zero()
NegatedAtom counter-at-zero()
end_variable
begin_variable
var1
-1
2
Atom have-cheese()
NegatedAtom have-cheese()
end_variable
begin_variable
var2
-1
2
Atom have-chips()
NegatedAtom have-chips()
end_variable
begin_variable
var3
-1
2
Atom have-crackers()
NegatedAtom have-crackers()
end_variable
begin_variable
var4
-1
2
Atom have-dip()
NegatedAtom have-dip()
end_variable
begin_variable
var5
-1
2
Atom have-pop()
NegatedAtom have-pop()
end_variable
begin_variable
var6
-1
2
Atom movie-rewound()
NegatedAtom movie-rewound()
end_variable
0
begin_state
1
1
1
1
1
1
1
end_state
begin_goal
7
0 0
1 0
2 0
3 0
4 0
5 0
6 0
end_goal
27
begin_operator
get-cheese z1
0
1
0 1 -1 0
1
end_operator
begin_operator
get-cheese z2
0
1
0 1 -1 0
1
end_operator
begin_operator
get-cheese z3
0
1
0 1 -1 0
1
end_operator
begin_operator
get-cheese z4
0
1
0 1 -1 0
1
end_operator
begin_operator
get-cheese z5
0
1
0 1 -1 0
1
end_operator
begin_operator
get-chips c1
0
1
0 2 -1 0
1
end_operator
begin_operator
get-chips c2
0
1
0 2 -1 0
1
end_operator
begin_operator
get-chips c3
0
1
0 2 -1 0
1
end_operator
begin_operator
get-chips c4
0
1
0 2 -1 0
1
end_operator
begin_operator
get-chips c5
0
1
0 2 -1 0
1
end_operator
begin_operator
get-crackers k1
0
1
0 3 -1 0
1
end_operator
begin_operator
get-crackers k2
0
1
0 3 -1 0
1
end_operator
begin_operator
get-crackers k3
0
1
0 3 -1 0
1
end_operator
begin_operator
get-crackers k4
0
1
0 3 -1 0
1
end_operator
begin_operator
get-crackers k5
0
1
0 3 -1 0
1
end_operator
begin_operator
get-dip d1
0
1
0 4 -1 0
1
end_operator
begin_operator
get-dip d2
0
1
0 4 -1 0
1
end_operator
begin_operator
get-dip d3
0
1
0 4 -1 0
1
end_operator
begin_operator
get-dip d4
0
1
0 4 -1 0
1
end_operator
begin_operator
get-dip d5
0
1
0 4 -1 0
1
end_operator
begin_operator
get-pop p1
0
1
0 5 -1 0
1
end_operator
begin_operator
get-pop p2
0
1
0 5 -1 0
1
end_operator
begin_operator
get-pop p3
0
1
0 5 -1 0
1
end_operator
begin_operator
get-pop p4
0
1
0 5 -1 0
1
end_operator
begin_operator
get-pop p5
0
1
0 5 -1 0
1
end_operator
begin_operator
reset-counter
0
1
0 0 -1 0
1
end_operator
begin_operator
rewind-movie
0
2
0 0 -1 1
0 6 -1 0
1
end_operator
0