Skip to content

Commit 0074a1d

Browse files
committed
Make the nocache tag actually work
If nocache is used, then we should return an empty string result, so the test doesn't get marked as borked. Also limit to an occurrence at the start, just like other skip tags.
1 parent 4d43cbe commit 0074a1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

run-tests.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3749,8 +3749,10 @@ public function checkSkip(string $php, string $code, string $checkFile, string $
37493749

37503750
save_text($checkFile, $code, $tempFile);
37513751
$result = trim(system_with_timeout("$php \"$checkFile\"", $env));
3752-
if (strpos($result, 'nocache') === false) {
3752+
if (strpos($result, 'nocache') !== 0) {
37533753
$this->skips[$key][$code] = $result;
3754+
} else {
3755+
$result = '';
37543756
}
37553757
$this->misses++;
37563758

0 commit comments

Comments
 (0)