diff options
author | hackademix | 2019-10-05 15:42:29 +0200 |
---|---|---|
committer | hackademix | 2019-10-05 15:45:56 +0200 |
commit | 5ee30535c41678209e52346fc69067753aa310b0 (patch) | |
tree | f75d3a39c2292b395b894030ab225300515314d9 /src/test | |
parent | 9e951a378c1bb86b5fd4c658966d148578aa6462 (diff) | |
download | noscript-5ee30535c41678209e52346fc69067753aa310b0.tar.gz noscript-5ee30535c41678209e52346fc69067753aa310b0.tar.xz noscript-5ee30535c41678209e52346fc69067753aa310b0.zip |
IPv4 subnet shortcut matching.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/Policy_test.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/Policy_test.js b/src/test/Policy_test.js index f658379..a0f92f3 100644 --- a/src/test/Policy_test.js +++ b/src/test/Policy_test.js @@ -7,6 +7,9 @@ p1.set("https://flashgot.net", p1.TRUSTED); p1.set("http://flashgot.net", p1.UNTRUSTED); p1.set("perchè.com", p1.TRUSTED); + p1.set("10", p1.TRUSTED); + p1.set("192.168", p1.TRUSTED); + p1.set("192.168.69", p1.UNTRUSTED) let p2 = new Policy(p1.dry()); debug("p1", JSON.stringify(p1.dry())); debug("p2", JSON.stringify(p2.dry())); @@ -23,7 +26,10 @@ () => !p1.can("http://secure.informaction.com"), () => p1.can("https://secure.informaction.com"), () => p1.can("https://www.secure.informaction.com"), + () => !p1.can("https://192.168.69.1"), + () => !p1.can("https://10.0.0.1"), + () => p1.can("http://192.168.1.2"), ]) Test.run(t); - + Test.report(); } |