summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Tests
diff options
context:
space:
mode:
authorStephan Unverwerth <s.unverwerth@gmx.de>2020-04-13 19:50:58 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-14 12:54:09 +0200
commit9477efe97032f15438b51bf01e2958cc76c554be (patch)
tree172eff7a0853aeaa58b8dc32ca7903eeb26e267f /Libraries/LibJS/Tests
parent9962db5bf82a37859a018d539da55f6afe41a8d2 (diff)
downloadserenity-9477efe97032f15438b51bf01e2958cc76c554be.zip
LibJS: Handle HTML-style comments
Diffstat (limited to 'Libraries/LibJS/Tests')
-rw-r--r--Libraries/LibJS/Tests/comments-basic.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/comments-basic.js b/Libraries/LibJS/Tests/comments-basic.js
new file mode 100644
index 0000000000..c819f61545
--- /dev/null
+++ b/Libraries/LibJS/Tests/comments-basic.js
@@ -0,0 +1,20 @@
+try {
+ var i = 0;
+
+ // i++;
+ /* i++; */
+ /*
+ i++;
+ */
+ <!-- i++; --> i++;
+ <!-- i++;
+ i++;
+ --> i++;
+
+ assert(i === 1);
+
+ console.log('PASS');
+} catch (e) {
+ console.log('FAIL: ' + e);
+}
+