Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added contraint need_uri, so that the few tests, which needs the tcllib uri package are skipped, if the uri package isn't present.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | rel-0-7-branch
Files: files | file ages | folders
SHA1:c6138985fa867ed3ec49b1a2159ec949962e70bf
User & Date: rolf 2003-07-08 16:00:46
Context
2003-07-08
16:17
Used != instead of the modern 'ne', for older tcl versions. check-in: 368c84013a user: rolf tags: trunk, rel-0-7-branch
16:00
Added contraint need_uri, so that the few tests, which needs the tcllib uri package are skipped, if the uri package isn't present. check-in: c6138985fa user: rolf tags: trunk, rel-0-7-branch
2003-07-07
19:53
Updated version Nr. to 0.7.8. check-in: f02fa69261 user: rolf tags: trunk, rel-0-7-branch
Changes

Changes to ChangeLog.








1
2
3
4
5
6
7







2003-07-06  Rolf Ade  <rolf@pointsman.de>

        * generic/tclexpat.c: Fixed bug in the subtree skipping
          feature of event handlers. Should be merged with HEAD.

        * lib/tdom.tcl: Fixed error reporting in tDOM::extRefHandler.   

>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
2003-08-06  Rolf Ade  <rolf@pointsman.de>

        * tests/all.tcl
        * tests/domCmd.test: Added contraint need_uri, so that the few
          tests, which needs the tcllib uri package are skipped, if
          the uri package isn't present.

2003-07-06  Rolf Ade  <rolf@pointsman.de>

        * generic/tclexpat.c: Fixed bug in the subtree skipping
          feature of event handlers. Should be merged with HEAD.

        * lib/tdom.tcl: Fixed error reporting in tDOM::extRefHandler.   

Changes to tests/all.tcl.

12
13
14
15
16
17
18




19
20



21
22
23
24
25
26
27
source [file join [file dir [info script]] loadtdom.tcl]

if {$tcl_version >= 8.1} {
    if {[lsearch [info proc ::tcltest::testConstraint] \
            ::tcltest::testConstraint] == -1} {
        set ::tcltest::testConfig(need_i18n) 1
        set ::tcltest::testConstraints(need_i18n) 1




   } else {
        ::tcltest::testConstraint need_i18n 1



    }
}

set timeCmd {clock format [clock seconds]}

set ::tcltest::testSingleFile false








>
>
>
>


>
>
>







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
source [file join [file dir [info script]] loadtdom.tcl]

if {$tcl_version >= 8.1} {
    if {[lsearch [info proc ::tcltest::testConstraint] \
            ::tcltest::testConstraint] == -1} {
        set ::tcltest::testConfig(need_i18n) 1
        set ::tcltest::testConstraints(need_i18n) 1
        if {[info procs ::tDOM::extRefHandler] ne ""} {
            set ::tcltest::testConfig(need_uri) 1
            set ::tcltest::testConstraints(need_uri) 1
        }
   } else {
        ::tcltest::testConstraint need_i18n 1
       if {[info procs ::tDOM::extRefHandler] ne ""} {
           ::tcltest::testConstraint need_uri 1
       }
    }
}

set timeCmd {clock format [clock seconds]}

set ::tcltest::testSingleFile false

Changes to tests/domCmd.test.

806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
...
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
...
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
...
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
$doc delete

test domCmd-6.1 {-useForeignDTD 0} {
    set doc [dom parse -useForeignDTD 0 {<root/>}]
    $doc delete
} {}

test domCmd-6.2 {-useForeignDTD 1 with document with internal subset} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set ::tDOM::useForeignDTD "data/domCmd1.dtd"
    set doc [dom parse \
            -useForeignDTD 1 \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler {
<!DOCTYPE root [
................................................................................
<root/>}]
    set root [$doc documentElement]
    set result [$root @fixed]
    $doc delete
    set result
} {toThat}

test domCmd-6.3 {-useForeignDTD 1 with document with internal subset} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set ::tDOM::useForeignDTD "data/domCmd1.dtd"
    set doc [dom parse \
            -useForeignDTD 1 \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler {
<!DOCTYPE root [
................................................................................
    set root [$doc documentElement]
    set result [$root @fixed]
    lappend result [$root @fixed2]
    $doc delete
    set result
} {toThis toThat}

test domCmd-6.4 {-useForeignDTD 1 with document without document declaration} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set ::tDOM::useForeignDTD "data/domCmd1.dtd"
    set doc [dom parse \
            -useForeignDTD 1 \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler <root/>]
    set root [$doc documentElement]
    set result [$root @fixed]
    $doc delete
    set result
} {toThis}

test domCmd-6.5 {-useForeignDTD 1 does not overwrite a given external subset} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set ::tDOM::useForeignDTD "data/domCmd1.dtd"
    set doc [dom parse \
            -useForeignDTD 1 \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler {
<!DOCTYPE root SYSTEM "data/domCmd2.dtd">
................................................................................
<root/>}]
    set root [$doc documentElement]
    set result [$root @fixed]
    $doc delete
    set result
} {toThat}

test domCmd-6.6 {-useForeignDTD with nonboolean arg} {
    set result [catch {set doc [dom parse -useForeignDTD foo <root/>]} errMsg]
    lappend result $errMsg
} {1 {-useForeignDTD must have a boolean arg}}

test domCmd-7.1 {document with external subset} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set doc [dom parse \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler {
<!DOCTYPE root SYSTEM "data/domCmd2.dtd">
<root/>}]
    set root [$doc documentElement]







|







 







|







 







|












|







 







|




|







806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
...
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
...
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
...
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
$doc delete

test domCmd-6.1 {-useForeignDTD 0} {
    set doc [dom parse -useForeignDTD 0 {<root/>}]
    $doc delete
} {}

test domCmd-6.2 {-useForeignDTD 1 with document with internal subset} {need_uri} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set ::tDOM::useForeignDTD "data/domCmd1.dtd"
    set doc [dom parse \
            -useForeignDTD 1 \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler {
<!DOCTYPE root [
................................................................................
<root/>}]
    set root [$doc documentElement]
    set result [$root @fixed]
    $doc delete
    set result
} {toThat}

test domCmd-6.3 {-useForeignDTD 1 with document with internal subset} {need_uri} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set ::tDOM::useForeignDTD "data/domCmd1.dtd"
    set doc [dom parse \
            -useForeignDTD 1 \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler {
<!DOCTYPE root [
................................................................................
    set root [$doc documentElement]
    set result [$root @fixed]
    lappend result [$root @fixed2]
    $doc delete
    set result
} {toThis toThat}

test domCmd-6.4 {-useForeignDTD 1 with document without document declaration} {need_uri} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set ::tDOM::useForeignDTD "data/domCmd1.dtd"
    set doc [dom parse \
            -useForeignDTD 1 \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler <root/>]
    set root [$doc documentElement]
    set result [$root @fixed]
    $doc delete
    set result
} {toThis}

test domCmd-6.5 {-useForeignDTD 1 does not overwrite a given external subset} {need_uri} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set ::tDOM::useForeignDTD "data/domCmd1.dtd"
    set doc [dom parse \
            -useForeignDTD 1 \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler {
<!DOCTYPE root SYSTEM "data/domCmd2.dtd">
................................................................................
<root/>}]
    set root [$doc documentElement]
    set result [$root @fixed]
    $doc delete
    set result
} {toThat}

test domCmd-6.6 {-useForeignDTD with nonboolean arg} {need_uri} {
    set result [catch {set doc [dom parse -useForeignDTD foo <root/>]} errMsg]
    lappend result $errMsg
} {1 {-useForeignDTD must have a boolean arg}}

test domCmd-7.1 {document with external subset} {need_uri} {
    set baseURI file://[file join [pwd] [file dir [info script]] domCmd.test]
    set doc [dom parse \
            -baseurl $baseURI \
            -externalentitycommand ::tDOM::extRefHandler {
<!DOCTYPE root SYSTEM "data/domCmd2.dtd">
<root/>}]
    set root [$doc documentElement]