From 63ed91af27cda8cab130864472ab9399bb4dfa80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Sun, 20 Apr 1997 04:25:50 +0200
Subject: [PATCH] Added test for parse_html.

Rev: src/modules/spider/testsuite.in:1.3
---
 src/modules/spider/testsuite.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/modules/spider/testsuite.in b/src/modules/spider/testsuite.in
index ea0f30e38a..e439650782 100644
--- a/src/modules/spider/testsuite.in
+++ b/src/modules/spider/testsuite.in
@@ -1,3 +1,4 @@
+test_true(objectp(spider))
 dnl fcgi_create_listen_socket
 dnl _lock
 dnl _unlock
@@ -58,6 +59,11 @@ dnl _num_mappings
 cond([[all_constants()->_num_mappings]],[[test_true(intp(_num_mappings()))]])
 dnl _dump_obj_table
 dnl parse_html
+test_eq([[parse_html("f<bar>o", ([ "bar":lambda(){return "o";} ]), ([]))]], "foo")
+test_eq([[parse_html("f<bar>o", ([ "bar":lambda(){return 0;} ]), ([]))]], "f<bar>o")
+test_eq([[parse_html("f<\nbar\rt\"a b\"=\no>o", ([ "bar":lambda(string s, mapping(string:string) attr){return attr["ta b"];} ]), ([]))]], "foo")
+test_eq([[parse_html("f<bar>g</bar>o", ([]), ([ "bar":lambda(){return "o";}]))]], "foo")
+test_eq([[parse_html("f<\nbar\rt\"a b\"=\no>g<\n/bar\r>o", ([]), ([ "bar":lambda(string s, mapping(string:string) attr, string g){return g=="g"?attr["ta b"]:"-";}]))]], "foo")
 dnl real_perror
 dnl openlog
 dnl syslog
-- 
GitLab