|
|
|
@ -1,7 +1,6 @@ |
|
|
|
|
|
|
|
|
|
let testString = "can-use-subgroups"; in |
|
|
|
|
|
|
|
|
|
import ./make-test-python.nix ({ ...}: { |
|
|
|
|
let |
|
|
|
|
testString = "can-use-subgroups"; |
|
|
|
|
in import ../make-test-python.nix ({ ...}: { |
|
|
|
|
name = "php-httpd-pcre-jit-test"; |
|
|
|
|
machine = { lib, pkgs, ... }: { |
|
|
|
|
time.timeZone = "UTC"; |
|
|
|
@ -10,15 +9,13 @@ import ./make-test-python.nix ({ ...}: { |
|
|
|
|
adminAddr = "please@dont.contact"; |
|
|
|
|
enablePHP = true; |
|
|
|
|
phpOptions = "pcre.jit = true"; |
|
|
|
|
extraConfig = |
|
|
|
|
let |
|
|
|
|
extraConfig = let |
|
|
|
|
testRoot = pkgs.writeText "index.php" |
|
|
|
|
'' |
|
|
|
|
<?php |
|
|
|
|
'' |
|
|
|
|
<?php |
|
|
|
|
preg_match('/(${testString})/', '${testString}', $result); |
|
|
|
|
var_dump($result); |
|
|
|
|
?> |
|
|
|
|
''; |
|
|
|
|
''; |
|
|
|
|
in |
|
|
|
|
'' |
|
|
|
|
Alias / ${testRoot}/ |
|
|
|
@ -30,11 +27,11 @@ import ./make-test-python.nix ({ ...}: { |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
testScript = { ... }: |
|
|
|
|
'' |
|
|
|
|
machine.wait_for_unit("httpd.service") |
|
|
|
|
# Ensure php evaluation by matching on the var_dump syntax |
|
|
|
|
assert 'string(${toString (builtins.stringLength testString)}) "${testString}"' in machine.succeed( |
|
|
|
|
"curl -vvv -s http://127.0.0.1:80/index.php" |
|
|
|
|
) |
|
|
|
|
''; |
|
|
|
|
'' |
|
|
|
|
machine.wait_for_unit("httpd.service") |
|
|
|
|
# Ensure php evaluation by matching on the var_dump syntax |
|
|
|
|
assert 'string(${toString (builtins.stringLength testString)}) "${testString}"' in machine.succeed( |
|
|
|
|
"curl -vvv -s http://127.0.0.1:80/index.php" |
|
|
|
|
) |
|
|
|
|
''; |
|
|
|
|
}) |