Skip to content

Commit

Permalink
* Fixed handling &<tag>
Browse files Browse the repository at this point in the history
* Added make check
  • Loading branch information
Jan Wielemaker committed Jan 26, 2001
1 parent d38b7bf commit 94cfa9e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* ADDED: `make check' to run the test-suite.

* FIXED: Handling of &<tag> (Richard O'Keefe).

* FIXED: dtd2pl to use model(Model) to avoid amibity between CDATA and
(CDATA) model. Richard O'Keefe.

Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ install-dtd:
done

check:
@echo "No check provided yet"
cd Test && $(PL) -f test.pl -g test,halt.

uninstall:
(cd $(PLBASE)/lib/$(PLARCH) && rm -f $(TARGETS))
Expand Down
14 changes: 14 additions & 0 deletions Test/noent.sgml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE tiny-htm [
<!ELEMENT tiny-htm - - (p|pre)+>
<!ELEMENT p - O (#PCDATA|i|b|var)*>
<!ELEMENT pre - O (#PCDATA|i|b|var)*>
<!ELEMENT (i|b|var) - - (#PCDATA|i|b|var)*>
]>
<tiny-htm>
<p>This demonstrates the problem:
<pre>
<var>status</var> = DOM_<var>operation</var
>, &<var>result</var>);
</pre>
<p>I hope this helps.
</tiny-htm>
1 change: 1 addition & 0 deletions Test/ok/noent.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[element('tiny-htm', [], [element(p, [], ['This demonstrates the problem:']), element(pre, [], [' ', element(var, [], [status]), ' = DOM_', element(var, [], [operation]), ', &', element(var, [], [result]), ');']), element(p, [], ['I hope this helps.'])])].
5 changes: 5 additions & 0 deletions Test/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
test/0
]).

:- asserta(user:file_search_path(library, '..')).
:- asserta(user:file_search_path(foreign, '..')).
:- use_module(library(sgml)).


test :-
testdir(.).

Expand Down
2 changes: 1 addition & 1 deletion parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -4244,8 +4244,8 @@ putchar_dtd_parser(dtd_parser *p, int chr)
p->state = S_ENT;
} else
{ add_cdata(p, f[CF_ERO]);
add_cdata(p, chr);
p->state = p->cdata_state;
goto reprocess;
}

return;
Expand Down

0 comments on commit 94cfa9e

Please sign in to comment.