Skip to content

Commit

Permalink
Tests: making exception test more portable in stream_js.t.
Browse files Browse the repository at this point in the history
  • Loading branch information
xeioex committed Sep 4, 2024
1 parent 8e02600 commit a3a4dd4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nginx/t/stream_js.t
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ $t->write_file('test.js', <<EOF);
}
function preread_except(s) {
var fs = require('fs');
fs.readFileSync();
decodeURI("%E0");
}
function filter_except(s) {
Expand Down Expand Up @@ -441,7 +440,7 @@ like(stream('127.0.0.1:' . port(8101))->read(), qr/\xaa\xbb\xcc\xdd/,
$t->stop();

ok(index($t->read_file('error.log'), 'SEE-THIS') > 0, 'stream js log');
ok(index($t->read_file('error.log'), 'at fs.readFileSync') > 0,
ok(index($t->read_file('error.log'), 'at decodeURI') > 0,
'stream js_preread backtrace');
ok(index($t->read_file('error.log'), 'at filter_except') > 0,
'stream js_filter backtrace');
Expand Down

0 comments on commit a3a4dd4

Please sign in to comment.