Skip to content

Commit

Permalink
Adding JSUnit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
heather committed Feb 15, 2008
1 parent 8cabe08 commit 9c0ac3d
Show file tree
Hide file tree
Showing 20 changed files with 1,950 additions and 0 deletions.
218 changes: 218 additions & 0 deletions jsunit/tests/data/data.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>test</title>
</head>

<body>
<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>

<p>foo</p>
</body>
</html>
30 changes: 30 additions & 0 deletions jsunit/tests/data/staff.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
staff {
display: table;
color: black;
background-color: white;
border: solid 1px black;
}

employee {
display: table-row;
border: solid 1px black;
padding: 1px;
}

employeeId, name, position, salary, gender, address {
display: table-cell;
border: solid 1px black;
padding: 1px;
}

address[domestic="Yes"] {
background-color: silver;
}

address[street="Yes"] {
color: green;
}

address[street="No"] {
color: red;
}
17 changes: 17 additions & 0 deletions jsunit/tests/data/staff.dtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!ELEMENT employeeId (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT position (#PCDATA)>
<!ELEMENT salary (#PCDATA)>
<!ELEMENT address (#PCDATA)>
<!ELEMENT entElement ( #PCDATA ) >
<!ELEMENT gender ( #PCDATA | entElement )* >
<!ELEMENT employee (employeeId, name, position, salary, gender, address) >
<!ELEMENT staff (employee)+>
<!ATTLIST entElement
attr1 CDATA "Attr">
<!ATTLIST address
domestic CDATA #IMPLIED
street CDATA "Yes">
<!ATTLIST entElement
domestic CDATA "MALE" >

58 changes: 58 additions & 0 deletions jsunit/tests/data/staff.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0"?><?TEST-STYLE PIDATA?>
<!DOCTYPE staff SYSTEM "staff.dtd" [
<!ENTITY ent1 "es">
<!ENTITY ent2 "1900 Dallas Road">
<!ENTITY ent3 "Texas">
<!ENTITY ent4 "<entElement domestic='Yes'>Element data</entElement><?PItarget PIdata?>">
<!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>
<!ENTITY ent1 "This entity should be discarded">
<!NOTATION notation1 PUBLIC "notation1File">
<!NOTATION notation2 SYSTEM "notation2File">
]>
<!-- This is comment number 1.-->
<staff>
<employee>
<employeeId>EMP0001</employeeId>
<name>Margaret Martin</name>
<position>Accountant</position>
<salary>56,000</salary>
<gender>Female</gender>
<address domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>
</employee>
<employee>
<employeeId>EMP0002</employeeId>
<name>Martha Raynolds<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>
<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>
<position>Secretary</position>
<salary>35,000</salary>
<gender>Female</gender>
<address domestic="Yes" street="Yes">&ent2; Dallas, &ent3;
98554</address>
</employee>
<employee>
<employeeId>EMP0003</employeeId>
<name>Roger
Jones</name>
<position>Department Manager</position>
<salary>100,000</salary>
<gender>&ent4;
</gender>
<address domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>
</employee>
<employee>
<employeeId>EMP0004</employeeId>
<name>Jeny Oconnor</name>
<position>Personnel Director</position>
<salary>95,000</salary>
<gender>Female</gender>
<address domestic="Yes" street="Y&ent1;">27 South Road. Dallas, Texas 98556</address>
</employee>
<employee>
<employeeId>EMP0005</employeeId>
<name>Robert Myers</name>
<position>Computer Specialist</position>
<salary>90,000</salary>
<gender>male</gender>
<address street="Yes">1821 Nordic. Road, Irving Texas 98558</address>
</employee>
</staff>
Loading

0 comments on commit 9c0ac3d

Please sign in to comment.