about summary refs log tree commit diff stats
path: root/test/js/date.html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-21 21:26:27 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-21 21:28:45 +0200
commite3d9ee2c6224cd30bf56e24f7988899e0e3985c1 (patch)
tree31116d7d751d058f32bf43313c12673423e8d8be /test/js/date.html
parentba88f015ea500bcc574b621392c721ef2c9dbcd0 (diff)
downloadchawan-e3d9ee2c6224cd30bf56e24f7988899e0e3985c1.tar.gz
test: add js & layout tests
(Sadly some layout tests still fail.)
Diffstat (limited to 'test/js/date.html')
-rw-r--r--test/js/date.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/js/date.html b/test/js/date.html
new file mode 100644
index 00000000..86a2818b
--- /dev/null
+++ b/test/js/date.html
@@ -0,0 +1,14 @@
+<!doctype html>
+<!--
+Test for whether the Date constructor works at all.
+QuickJS uses some syscalls and library calls for this, and sandboxing
+sometimes isn't very cooperative in this regard.
+-->
+<title>Date constructor test</title>
+<div id=x>Fail</div>
+<script>
+(function() {
+	new Date();
+	document.getElementById("x").textContent = "Success";
+})();
+</script>