diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2023-01-24 01:12:22 +0000 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2023-01-24 01:12:22 +0000 |
commit | 05c56394587ae9bda36ce7e481af12caf76b5252 (patch) | |
tree | 9ffb12cebafbcbd5a7f9b8ea6859308de150c4f3 /test/test_njs.py | |
parent | 6dad38f6555d84a3e56a606c66f6b004820cc4ce (diff) | |
download | unit-05c56394587ae9bda36ce7e481af12caf76b5252.tar.gz unit-05c56394587ae9bda36ce7e481af12caf76b5252.tar.bz2 |
Tests: added NJS iteration tests.
Diffstat (limited to '')
-rw-r--r-- | test/test_njs.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_njs.py b/test/test_njs.py index 1f564656..14662ff8 100644 --- a/test/test_njs.py +++ b/test/test_njs.py @@ -50,6 +50,12 @@ class TestNJS(TestApplicationProto): self.check_expression('${uri + host}') self.check_expression('${uri + `${host}`}') + def test_njs_iteration(self, temp_dir): + self.create_files('Connection,Host', 'close,localhost') + + self.check_expression('/${Object.keys(headers).sort().join()}') + self.check_expression('/${Object.values(headers).sort().join()}') + def test_njs_variables(self, temp_dir): self.create_files('str', 'localhost', '127.0.0.1') |