Mercurial > hg > nginx-tests
comparison stream_set.t @ 1693:5ac6efbe5552
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 01 Jun 2021 16:40:18 +0300 |
parents | f3ba4c74de31 |
children |
comparison
equal
deleted
inserted
replaced
1692:f6795e2e6a4b | 1693:5ac6efbe5552 |
---|---|
21 ############################################################################### | 21 ############################################################################### |
22 | 22 |
23 select STDERR; $| = 1; | 23 select STDERR; $| = 1; |
24 select STDOUT; $| = 1; | 24 select STDOUT; $| = 1; |
25 | 25 |
26 my $t = Test::Nginx->new()->has(qw/stream stream_return stream_set/); | 26 my $t = Test::Nginx->new() |
27 ->has(qw/stream stream_return stream_map stream_set/); | |
27 | 28 |
28 $t->write_file_expand('nginx.conf', <<'EOF'); | 29 $t->write_file_expand('nginx.conf', <<'EOF'); |
29 | 30 |
30 %%TEST_GLOBALS%% | 31 %%TEST_GLOBALS%% |
31 | 32 |
34 events { | 35 events { |
35 } | 36 } |
36 | 37 |
37 stream { | 38 stream { |
38 %%TEST_GLOBALS_STREAM%% | 39 %%TEST_GLOBALS_STREAM%% |
39 | |
40 | 40 |
41 map 0 $map_var { | 41 map 0 $map_var { |
42 default "original"; | 42 default "original"; |
43 } | 43 } |
44 | 44 |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 EOF | 59 EOF |
60 | 60 |
61 $t->try_run('no stream set')->plan(2); | 61 $t->run()->plan(2); |
62 | 62 |
63 ############################################################################### | 63 ############################################################################### |
64 | 64 |
65 is(stream('127.0.0.1:' . port(8082))->read(), 'new:original', 'set'); | 65 is(stream('127.0.0.1:' . port(8082))->read(), 'new:original', 'set'); |
66 is(stream('127.0.0.1:' . port(8083))->read(), '', 'uninitialized variable'); | 66 is(stream('127.0.0.1:' . port(8083))->read(), '', 'uninitialized variable'); |