From 55c89531f80fc80de4caf456269a70599214b48a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 2 Jan 2019 21:54:51 +0100 Subject: [PATCH] doxygen: test the HTML escaping a bit more. I got confused by how Chrome displays plain text in the developer console (there's no escaping visible), so extending the test a bit to be absolutely really sure that it's correct :D --- doxygen/test/test-search.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doxygen/test/test-search.js b/doxygen/test/test-search.js index ead76881..62615b7f 100644 --- a/doxygen/test/test-search.js +++ b/doxygen/test/test-search.js @@ -33,11 +33,20 @@ const { StringDecoder } = require('string_decoder'); /* HTML escaping with RTL workarounds */ { + assert.equal(Search.escape("foo()"), "foo()"); assert.equal(Search.escapeForRtl("foo()"), "foo(‎)‎"); + + assert.equal(Search.escape("Dir/"), "Dir/"); /* Not sure why / and & has to be escaped from both sides */ assert.equal(Search.escapeForRtl("Dir/"), "Dir‎/‎"); + + assert.equal(Search.escape("foo() &&"), "foo() &&"); assert.equal(Search.escapeForRtl("foo() &&"), "foo(‎)‎ ‎&‎‎&‎"); + + assert.equal(Search.escape("operator=()"), "operator=()"); assert.equal(Search.escapeForRtl("operator=()"), "operator‎=(‎)‎"); + + assert.equal(Search.escape("NS::Class"), "NS::Class<int>"); assert.equal(Search.escapeForRtl("NS::Class"), "NS‎:‎:Class<int‎>‎"); } -- 2.30.2