php5 test coverage

This commit is contained in:
z7zmey
2018-02-14 12:30:41 +02:00
parent 4cac863d8f
commit 6d714725bd
4 changed files with 1484 additions and 1411 deletions

View File

@@ -55,6 +55,8 @@ func TestPhp5(t *testing.T) {
$test
';
<<<CAD
CAD;
<<<CAD
hello
CAD;
<<<"CAD"
@@ -235,7 +237,7 @@ CAD;
eval($a);
exit;
exit($a);
die;
die();
die($a);
foo();
namespace\foo(&$a);
@@ -267,7 +269,9 @@ CAD;
new \Foo();
print($a);
$a->foo;
` + "`cmd $a`;" + `
` + "`cmd $a`;" + `
` + "`cmd`;" + `
` + "``;" + `
[];
[1];
[1=>1, &$b,];
@@ -486,6 +490,9 @@ CAD;
&stmt.Expression{
Expr: &scalar.String{Value: "'\n\t\t\t$test\n\t\t'"},
},
&stmt.Expression{
Expr: &scalar.Encapsed{},
},
&stmt.Expression{
Expr: &scalar.String{Value: "\thello\n"},
},
@@ -2198,6 +2205,18 @@ CAD;
},
},
},
&stmt.Expression{
Expr: &expr.ShellExec{
Parts: []node.Node{
&scalar.EncapsedStringPart{Value: "cmd"},
},
},
},
&stmt.Expression{
Expr: &expr.ShellExec{
Parts: []node.Node{},
},
},
&stmt.Expression{
Expr: &expr.ShortArray{
Items: []node.Node{},