Tcl Library Source Code

Check-in [af0b003dad]
Login

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

Overview
Comment:Move many tests assets into a proper subdir of the module.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | test-assets
Files: files | file ages | folders
SHA3-256: af0b003dadc0e96954971a4e75777c654462bf304fc7841acb86ae1a84d6177e
User & Date: andreask 2019-06-21 00:04:27.227
Context
2019-06-21
05:05
Reworked the amazon-s3 test setup to check for and tell about the AWS authentication requirements it has. check-in: c17997785d user: aku tags: test-assets
00:04
Move many tests assets into a proper subdir of the module. check-in: af0b003dad user: andreask tags: test-assets
00:03
mime - B, T, version bumped to 1.6.2. - Fixed missing export of documented `buildmessage` command through the mime ensemble. - Shifted asset access support in tests to general utilities. check-in: a6f1dc74fe user: andreask tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/bee/bee.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
# bee.test:  tests for the bee encoding.
#
# Copyright (c) 2004 by Andreas Kupries <[email protected]>
# All rights reserved.
#
# RCS: @(#) $Id: bee.test,v 1.9 2006/10/09 21:41:39 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]




|

<
<







1
2
3
4
5


6
7
8
9
10
11
12
# -*- tcl -*-
# bee.test:  tests for the bee encoding.
#
# Copyright (c) 2004,2018 by Andreas Kupries <[email protected]>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
}


test bee-12.0 {decoder, torrent file} {
    set end 0

    # tcltest::viewFile does not do binary :(
    set f [open  [file join $::tcltest::testsDirectory example.torrent] r]
    fconfigure $f -translation binary
    set d [read $f]
    close $f

    set data [bee::decode $d end]

    # Cut the binary stuff out of the result, to much, display problems







|







301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
}


test bee-12.0 {decoder, torrent file} {
    set end 0

    # tcltest::viewFile does not do binary :(
    set f [open  [asset example.torrent] r]
    fconfigure $f -translation binary
    set d [read $f]
    close $f

    set data [bee::decode $d end]

    # Cut the binary stuff out of the result, to much, display problems
378
379
380
381
382
383
384

	removeFile bee16.$n
	set res
    } [lrange $result 0 1] ; # {}
}

# ....... ............................................................
testsuiteCleanup








>
376
377
378
379
380
381
382
383
	removeFile bee16.$n
	set res
    } [lrange $result 0 1] ; # {}
}

# ....... ............................................................
testsuiteCleanup
return
Name change from modules/bee/example.torrent to modules/bee/test-assets/example.torrent.

cannot compute difference between binary files

Changes to modules/bibtex/bibtex.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
# bibtex.test:  tests for the bibtex parser.
#
# Copyright (c) 2005 by Andreas Kupries <[email protected]>
# All rights reserved.
#
# RCS: @(#) $Id: bibtex.test,v 1.7 2006/10/09 21:41:40 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]






<
<







1
2
3
4
5


6
7
8
9
10
11
12
# -*- tcl -*-
# bibtex.test:  tests for the bibtex parser.
#
# Copyright (c) 2005 by Andreas Kupries <[email protected]>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
	year      1990 \
	pages     471--478 \
	address   {Boston, MA} \
	]]]


test bibtex-2.0 {Parse string, direct result} {
    set str [viewFile [file join [file dirname [info script]] bytecode.bib]]
    bibtex::parse $str
} $bytecode

test bibtex-2.1 {Parse string, sax mode} {
    set track {}
    set str [viewFile [file join [file dirname [info script]] bytecode.bib]]
    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   {track string__} \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \
	    $str]
    bibtex::destroy $t
    list $t $track
} [list bibtex2 [list \
	{progress bibtex2 100} \
	[linsert [lindex $bytecode 0] 0 record__ bibtex2]
]]

test bibtex-2.2 {Parse channel, direct result} {
    # The contents of penn_sub.bib have been taken out of
    # ftp://ftp.cis.upenn.edu/pub/anoop/bib/pennbib.bib

    set chan    [open [file join [file dirname [info script]] penn_sub.bib] r]
    set records [bibtex::parse -channel $chan]
    close $chan
    set records
} $pennfull

test bibtex-2.3 {Parse channel, sax mode} {
    set track {}
    set chan [open [file join [file dirname [info script]] penn_sub.bib] r]

    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   {track string__} \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \







|





|


















|







|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
	year      1990 \
	pages     471--478 \
	address   {Boston, MA} \
	]]]


test bibtex-2.0 {Parse string, direct result} {
    set str [viewFile [asset bytecode.bib]]
    bibtex::parse $str
} $bytecode

test bibtex-2.1 {Parse string, sax mode} {
    set track {}
    set str [viewFile [asset bytecode.bib]]
    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   {track string__} \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \
	    $str]
    bibtex::destroy $t
    list $t $track
} [list bibtex2 [list \
	{progress bibtex2 100} \
	[linsert [lindex $bytecode 0] 0 record__ bibtex2]
]]

test bibtex-2.2 {Parse channel, direct result} {
    # The contents of penn_sub.bib have been taken out of
    # ftp://ftp.cis.upenn.edu/pub/anoop/bib/pennbib.bib

    set chan    [open [asset penn_sub.bib] r]
    set records [bibtex::parse -channel $chan]
    close $chan
    set records
} $pennfull

test bibtex-2.3 {Parse channel, sax mode} {
    set track {}
    set chan [open [asset penn_sub.bib] r]

    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   {track string__} \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
	{string__ bibtex4 {aaai90 {Proc. National Conference on Artificial Intelligence, Boston}}} \
	{progress bibtex4 100} \
	[linsert [lindex $penn 0] 0 record__ bibtex4] \
	]

test bibtex-2.4 {Parse channel, sax mode 2} {
    set track {}
    set chan [open [file join [file dirname [info script]] penn_sub.bib] r]

    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   addstr \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \







|







162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
	{string__ bibtex4 {aaai90 {Proc. National Conference on Artificial Intelligence, Boston}}} \
	{progress bibtex4 100} \
	[linsert [lindex $penn 0] 0 record__ bibtex4] \
	]

test bibtex-2.4 {Parse channel, sax mode 2} {
    set track {}
    set chan [open [asset penn_sub.bib] r]

    set t [bibtex::parse \
	    -progresscommand {track progress} \
	    -commentcommand  {track comment_} \
	    -stringcommand   addstr \
	    -preamblecommand {track preamble} \
	    -recordcommand   {track record__} \
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
	[linsert [lindex $pennfull 0] 0 record__ bibtex5] \
	]

test bibtex-2.5 {Parse channel, async} {
    # The contents of penn_sub.bib have been taken out of
    # ftp://ftp.cis.upenn.edu/pub/anoop/bib/pennbib.bib

    set chan [open [file join [file dirname [info script]] penn_sub.bib] r]
    proc done {args} {global done ; set done $args ; return}

    set done ""
    set t [bibtex::parse -command done -channel $chan]
    vwait ::done
    bibtex::destroy $t
    close $chan







|







186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
	[linsert [lindex $pennfull 0] 0 record__ bibtex5] \
	]

test bibtex-2.5 {Parse channel, async} {
    # The contents of penn_sub.bib have been taken out of
    # ftp://ftp.cis.upenn.edu/pub/anoop/bib/pennbib.bib

    set chan [open [asset penn_sub.bib] r]
    proc done {args} {global done ; set done $args ; return}

    set done ""
    set t [bibtex::parse -command done -channel $chan]
    vwait ::done
    bibtex::destroy $t
    close $chan
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
test bibtex-3.2 {Destroying a parser} {
    set code [catch {::bibtex::destroy foo} msg]
    list $code $msg
} {1 {Illegal bibtex parser "foo"}}

test bibtex-4.0 {Destroying a parser} {

    set chan [open [file join [file dirname [info script]] bytecode.bib] r]
    proc done {args} {global done ; set done $args ; return}

    set done ""
    set t [bibtex::parse -command done -channel $chan]
    bibtex::destroy $t
    close $chan
} {}

# ... Tests of addStrings ...
#     (Requires introspection of parser state)

testsuiteCleanup







|












215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
test bibtex-3.2 {Destroying a parser} {
    set code [catch {::bibtex::destroy foo} msg]
    list $code $msg
} {1 {Illegal bibtex parser "foo"}}

test bibtex-4.0 {Destroying a parser} {

    set chan [open [asset bytecode.bib] r]
    proc done {args} {global done ; set done $args ; return}

    set done ""
    set t [bibtex::parse -command done -channel $chan]
    bibtex::destroy $t
    close $chan
} {}

# ... Tests of addStrings ...
#     (Requires introspection of parser state)

testsuiteCleanup
Name change from modules/bibtex/bytecode.bib to modules/bibtex/test-assets/bytecode.bib.
Name change from modules/bibtex/penn_sub.bib to modules/bibtex/test-assets/penn_sub.bib.
Changes to modules/comm/comm.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the comm module.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001 by ActiveState Tool Corp.
# All rights reserved.
#
# RCS: @(#) $Id: comm.test,v 1.14 2010/09/15 19:48:33 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









<
<







1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for the comm module.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001 by ActiveState Tool Corp.
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
}

# ------------------------------------------------------------------------
# First order of things is to spawn a separate tclsh into the background
# and have it execute comm too, with some general code to respond to our
# requests

useLocalFile comm.slaveboot

# ------------------------------------------------------------------------

test comm-1.0 {set remote variable} {
    ::comm::comm send [slave] {set foo b}
} {b}








|







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
}

# ------------------------------------------------------------------------
# First order of things is to spawn a separate tclsh into the background
# and have it execute comm too, with some general code to respond to our
# requests

source [asset comm.slaveboot]

# ------------------------------------------------------------------------

test comm-1.0 {set remote variable} {
    ::comm::comm send [slave] {set foo b}
} {b}

Name change from modules/comm/comm.slaveboot to modules/comm/test-assets/comm.slaveboot.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- tcl -*-
# Script to boot a child running an open comm server

set spawncode [makeFile {
    catch {wm withdraw .}
    ##puts [set fh [open ~/foo w]] $argv ; close $fh

    source [lindex $argv 0]     ; # load 'snit'
    source [lindex $argv 1].tcl ; # load 'comm'
    # and wait for commands. But first send our
    # own server socket to the initiator
    ::comm::comm send [lindex $argv 2] [list slaveat [::comm::comm self]]
    vwait forever
} spawn]

proc slaveat {id} {
    #puts "Slave @ $id"
    proc slave {} [list return $id]
    set ::go .
}

#puts "self @ [::comm::comm self]"

exec \
    [info nameofexecutable] $spawncode \
    [tcllibPath snit/snit.tcl] \
    [file rootname [info script]] \
    [::comm::comm self] &

#puts "Waiting for spawned comm system to boot"
# Wait for the slave to initialize itself.
vwait ::go

#puts "Running tests"



|
<
<
<
<
<
<
<
<
<
<












|







1
2
3
4










5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# -*- tcl -*-
# Script to boot a child running an open comm server

set spawncode [asset slave.tcl]











proc slaveat {id} {
    #puts "Slave @ $id"
    proc slave {} [list return $id]
    set ::go .
}

#puts "self @ [::comm::comm self]"

exec \
    [info nameofexecutable] $spawncode \
    [tcllibPath snit/snit.tcl] \
    [localPath  comm.tcl] \
    [::comm::comm self] &

#puts "Waiting for spawned comm system to boot"
# Wait for the slave to initialize itself.
vwait ::go

#puts "Running tests"
Added modules/comm/test-assets/slave.tcl.




















>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
# -*- tcl -*-
catch {wm withdraw .}
##puts [set fh [open ~/foo w]] $argv ; close $fh

source [lindex $argv 0] ; # load 'snit'
source [lindex $argv 1] ; # load 'comm'
# and wait for commands. But first send our
# own server socket to the initiator
::comm::comm send [lindex $argv 2] [list slaveat [::comm::comm self]]
vwait forever
Changes to modules/csv/csv.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the find function.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001-2011 by Andreas Kupries <[email protected]>
# All rights reserved.
#
# RCS: @(#) $Id: csv.test,v 1.23 2011/11/23 02:22:10 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









<
<







1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for the find function.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2001-2011 by Andreas Kupries <[email protected]>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
    ::struct::matrix m
    catch {::csv::read2matrix dummy m foo} result
    m destroy
    set result
} {illegal separator character "foo", is a string}

test csv-5.1 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f
    set result [list [q size] [q get 2]]
    q destroy
    set result
} {251 {{000 VERSIONS: 2:8.4a3 1:8.4a3 1:8.4a3%} {001 {CATCH return ok} 7 13 53.85}}}

test csv-5.2 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench_a.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f
    set result [list [q size] [q get 2]]
    q destroy
    set result
} {251 {{000 VERSIONS: 2:8.4a3 1:8.4a3 1:8.4a3%} {001 {CATCH return ok} 7 13 53.85}}}

test csv-5.3 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.4 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench_a.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.5 {reading csv files} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set result [list]
    foreach c {0 1 2 3 4} {
	lappend result [m columnwidth $c]
    }
    m destroy
    set result
} {3 39 7 7 8}

test csv-5.6 {reading csv files, linking} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    m link a
    set result [array size a]
    m destroy
    set result
} {1255}


test csv-5.7 {reading csv files, empty expansion mode} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    ::csv::read2matrix $f m , empty
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.8 {reading csv files, auto expansion mode} {
    set f [open [file join $::tcltest::testsDirectory mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 1
    ::csv::read2matrix $f m , auto
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

# =========================================================================
# Bug 2926387

test csv-5.9.0 {reading csv files, inner field newline processing, bug 2926387} {
    set m [struct::matrix]
    set f [open [file join $::tcltest::testsDirectory 2926387.csv] r]
    csv::read2matrix $f $m , auto
    close $f
    set result [$m serialize]
    $m destroy
    set result
} {2 3 {{a b c} {d {e,
e} f}}}

test csv-5.9.1 {reading csv files, inner field newline processing, bug 2926387} {
    set q [struct::queue]
    set f [open [file join $::tcltest::testsDirectory 2926387.csv] r]
    csv::read2queue $f $q
    close $f
    set result [$q get [$q size]]
    $q destroy
    set result
} {{a b c} {d {e,
e} f}}

# =========================================================================

test csv-6.1 {writing csv files} {
    set f [open [localPath eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set f [open [makeFile {} eval-out1.csv] w]
    ::csv::writematrix m $f







|









|









|










|










|














|












|









|














|










|











|







347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
    ::struct::matrix m
    catch {::csv::read2matrix dummy m foo} result
    m destroy
    set result
} {illegal separator character "foo", is a string}

test csv-5.1 {reading csv files} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f
    set result [list [q size] [q get 2]]
    q destroy
    set result
} {251 {{000 VERSIONS: 2:8.4a3 1:8.4a3 1:8.4a3%} {001 {CATCH return ok} 7 13 53.85}}}

test csv-5.2 {reading csv files} {
    set f [open [asset mem_debug_bench_a.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f
    set result [list [q size] [q get 2]]
    q destroy
    set result
} {251 {{000 VERSIONS: 2:8.4a3 1:8.4a3 1:8.4a3%} {001 {CATCH return ok} 7 13 53.85}}}

test csv-5.3 {reading csv files} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.4 {reading csv files} {
    set f [open [asset mem_debug_bench_a.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.5 {reading csv files} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set result [list]
    foreach c {0 1 2 3 4} {
	lappend result [m columnwidth $c]
    }
    m destroy
    set result
} {3 39 7 7 8}

test csv-5.6 {reading csv files, linking} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f
    m link a
    set result [array size a]
    m destroy
    set result
} {1255}


test csv-5.7 {reading csv files, empty expansion mode} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    ::csv::read2matrix $f m , empty
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

test csv-5.8 {reading csv files, auto expansion mode} {
    set f [open [asset mem_debug_bench.csv] r]
    ::struct::matrix m
    m add columns 1
    ::csv::read2matrix $f m , auto
    close $f
    set result [m get rect 0 227 end 231]
    m destroy
    set result
} {{227 {STR append (1MB + 1MB * 3)} 125505 327765 38.29} {228 {STR append (1MB + 1MB * 5)} 158507 855295 18.53} {229 {STR append (1MB + (1b + 1K + 1b) * 100)} 33101 174031 19.02} {230 {STR info locals match} 946 1521 62.20} {231 {TRACE no trace set} 34 121 28.10}}

# =========================================================================
# Bug 2926387

test csv-5.9.0 {reading csv files, inner field newline processing, bug 2926387} {
    set m [struct::matrix]
    set f [open [asset 2926387.csv] r]
    csv::read2matrix $f $m , auto
    close $f
    set result [$m serialize]
    $m destroy
    set result
} {2 3 {{a b c} {d {e,
e} f}}}

test csv-5.9.1 {reading csv files, inner field newline processing, bug 2926387} {
    set q [struct::queue]
    set f [open [asset 2926387.csv] r]
    csv::read2queue $f $q
    close $f
    set result [$q get [$q size]]
    $q destroy
    set result
} {{a b c} {d {e,
e} f}}

# =========================================================================

test csv-6.1 {writing csv files} {
    set f [open [asset eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set f [open [makeFile {} eval-out1.csv] w]
    ::csv::writematrix m $f
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05}

test csv-6.2 {writing csv files} {
    set f [open [localPath eval.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f

    set f [open [makeFile {} eval-out2.csv] w]
    ::csv::writequeue q $f
    close $f







|







487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05}

test csv-6.2 {writing csv files} {
    set f [open [asset eval.csv] r]
    ::struct::queue q
    ::csv::read2queue $f q
    close $f

    set f [open [makeFile {} eval-out2.csv] w]
    ::csv::writequeue q $f
    close $f
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05}


test csv-7.1 {reporting} {
    set f [open [localPath eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set result [m format 2string csv::report]
    m destroy
    set result
} {023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05
}

test csv-7.2 {reporting} {
    set f [open [localPath eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set f [open [makeFile {} eval-out3.csv] w]
    m format 2chan csv::report $f







|

















|







509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05}


test csv-7.1 {reporting} {
    set f [open [asset eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set result [m format 2string csv::report]
    m destroy
    set result
} {023,EVAL cmd eval in list obj var,26,45,57.78
024,EVAL cmd eval as list,23,42,54.76
025,EVAL cmd eval as string,53,92,57.61
026,EVAL cmd and mixed lists,3805,11276,33.74
027,EVAL list cmd and mixed lists,3812,11325,33.66
028,EVAL list cmd and pure lists,592,1598,37.05
}

test csv-7.2 {reporting} {
    set f [open [asset eval.csv] r]
    ::struct::matrix m
    m add columns 5
    ::csv::read2matrix $f m
    close $f

    set f [open [makeFile {} eval-out3.csv] w]
    m format 2chan csv::report $f
Name change from modules/csv/2926387.csv to modules/csv/test-assets/2926387.csv.
Name change from modules/csv/eval.csv to modules/csv/test-assets/eval.csv.
Name change from modules/csv/mem_debug_bench.csv to modules/csv/test-assets/mem_debug_bench.csv.
Name change from modules/csv/mem_debug_bench_a.csv to modules/csv/test-assets/mem_debug_bench_a.csv.
Changes to modules/exif/exif.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# -*- tcl -*-
# exif.test:  tests for the exif structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2001-2006 by Andreas Kupries <[email protected]>
# All rights reserved.
#
# RCS: @(#) $Id: exif.test,v 1.6 2006/10/09 21:41:40 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.3
testsNeedTcltest 1.0

testing {
    useLocal exif.tcl exif
}

# -------------------------------------------------------------------------

test exif-makernote-19.0 {makernote field 19 (afpoint) is optional} {
    # AFPoint == AutoFocus Point

    set f [open [file join $::tcltest::testsDirectory noafpoint.jpg] r]
    fconfigure $f -translation binary
    array set resa [exif::analyze $f]
    close $f
    set resa(FocalPlaneXResolution) [format %13.8f $resa(FocalPlaneXResolution)]
    set resa(FocalPlaneYResolution) [format %13.8f $resa(FocalPlaneYResolution)]
    set res [dictsort [array get resa]]
    unset resa
    set res
} {AFPointsUsed {3 right} AperatureValue 7.1 AutoFocusMode {AI servo} CameraMake Canon CameraModel {Canon PowerShot S100} ColorSpace 1 ComponentsConfigured 0x00030201 Contrast Normal DateTime {2004:09:06 05:22:56} DateTimeDigitized {2004:09:06 05:22:56} DateTimeOriginal {2004:09:06 05:22:56} ExifImageHeight 1200 ExifImageWidth 1600 ExifInteroperabilityOffset 1088 ExifVersion 0210 ExposureBiasValue 0 ExposureTime {1/250.0 seconds} FNumber 7.1 FileSource {3 - Digital camera} FirmwareVersion {Firmware Version 1.0} Flash no FlashMode auto FlashPixVersion 0100 FocalLength {5.40625 mm} FocalPlaneResolutionUnit inch FocalPlaneXResolution 7766.99029126 FocalPlaneYResolution 7741.93548387 ISO unknown ImageFormat {IMG:JPEG file} ImageNumber 140-4060 ImageQuality Fine ImageSize large MacroMode normal MeteringMode unknown Orientation 1 Owner Irochka ResolutionUnit inch Saturation Normal SensingMethod 2 Sharpness Normal ShootingMode {Single frame} ShutterSpeedValue {250 Hz} SubjectDistance {3.358 m} UnknownTag-0x10 100925440 UserComment {554 - } WhiteBalance Auto XResolution 180.0 YCbCrPositioning {Center of pixel array} YResolution 180.0}

testsuiteCleanup









<
<



















|











1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- tcl -*-
# exif.test:  tests for the exif structure.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 2001-2006 by Andreas Kupries <[email protected]>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.3
testsNeedTcltest 1.0

testing {
    useLocal exif.tcl exif
}

# -------------------------------------------------------------------------

test exif-makernote-19.0 {makernote field 19 (afpoint) is optional} {
    # AFPoint == AutoFocus Point

    set f [open [asset noafpoint.jpg] r]
    fconfigure $f -translation binary
    array set resa [exif::analyze $f]
    close $f
    set resa(FocalPlaneXResolution) [format %13.8f $resa(FocalPlaneXResolution)]
    set resa(FocalPlaneYResolution) [format %13.8f $resa(FocalPlaneYResolution)]
    set res [dictsort [array get resa]]
    unset resa
    set res
} {AFPointsUsed {3 right} AperatureValue 7.1 AutoFocusMode {AI servo} CameraMake Canon CameraModel {Canon PowerShot S100} ColorSpace 1 ComponentsConfigured 0x00030201 Contrast Normal DateTime {2004:09:06 05:22:56} DateTimeDigitized {2004:09:06 05:22:56} DateTimeOriginal {2004:09:06 05:22:56} ExifImageHeight 1200 ExifImageWidth 1600 ExifInteroperabilityOffset 1088 ExifVersion 0210 ExposureBiasValue 0 ExposureTime {1/250.0 seconds} FNumber 7.1 FileSource {3 - Digital camera} FirmwareVersion {Firmware Version 1.0} Flash no FlashMode auto FlashPixVersion 0100 FocalLength {5.40625 mm} FocalPlaneResolutionUnit inch FocalPlaneXResolution 7766.99029126 FocalPlaneYResolution 7741.93548387 ISO unknown ImageFormat {IMG:JPEG file} ImageNumber 140-4060 ImageQuality Fine ImageSize large MacroMode normal MeteringMode unknown Orientation 1 Owner Irochka ResolutionUnit inch Saturation Normal SensingMethod 2 Sharpness Normal ShootingMode {Single frame} ShutterSpeedValue {250 Hz} SubjectDistance {3.358 m} UnknownTag-0x10 100925440 UserComment {554 - } WhiteBalance Auto XResolution 180.0 YCbCrPositioning {Center of pixel array} YResolution 180.0}

testsuiteCleanup
Name change from modules/exif/noafpoint.jpg to modules/exif/test-assets/noafpoint.jpg.

cannot compute difference between binary files

Changes to modules/fileutil/filetype.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# -*- tcl -*-
# Tests for the find function.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2001 by ActiveState Tool Corp.
# Copyright (c) 2005-2007,2017 by Andreas Kupries <[email protected]>
# All rights reserved.
#
# RCS: @(#) $Id: filetype.test,v 1.1 2007/08/03 23:07:25 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]











<
<







1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the find function.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# Copyright (c) 2001 by ActiveState Tool Corp.
# Copyright (c) 2005-2007,2017 by Andreas Kupries <[email protected]>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
    set f [makeGzipFile]
    set res [catch {fileutil::fileType $f} msg]
    removeGzipFile
    list $res $msg
} [list 0 [list binary compressed gzip]]

test fileType-1.22 {text pdf} {
    set f [localPath test-data/pdf4tcl_01.pdf]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list text pdf]]

# -------------------------------------------------------------------------

test fileType-1.23 {sqlite3, fossil repo} {
    set f [localPath test-data/p.fossil]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 fossil-repository]]

test fileType-1.24 {sqlite3, fossil checkout} {
    set f [localPath test-data/p.ckout]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 fossil-checkout]]

test fileType-1.25 {sqlite3, fossil global config} {
    set f [localPath test-data/p.global]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 fossil-global-config]]

test fileType-1.26 {sqlite3, no app} {
    set f [localPath test-data/p.sqlite]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 A00000000]]

# -------------------------------------------------------------------------

unset path
testsuiteCleanup
return







|







|





|





|





|









175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
    set f [makeGzipFile]
    set res [catch {fileutil::fileType $f} msg]
    removeGzipFile
    list $res $msg
} [list 0 [list binary compressed gzip]]

test fileType-1.22 {text pdf} {
    set f [asset pdf4tcl_01.pdf]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list text pdf]]

# -------------------------------------------------------------------------

test fileType-1.23 {sqlite3, fossil repo} {
    set f [asset p.fossil]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 fossil-repository]]

test fileType-1.24 {sqlite3, fossil checkout} {
    set f [asset p.ckout]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 fossil-checkout]]

test fileType-1.25 {sqlite3, fossil global config} {
    set f [asset p.global]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 fossil-global-config]]

test fileType-1.26 {sqlite3, no app} {
    set f [asset p.sqlite]
    set res [catch {fileutil::fileType $f} msg]
    list $res $msg
} [list 0 [list binary sqlite3 A00000000]]

# -------------------------------------------------------------------------

unset path
testsuiteCleanup
return
Name change from modules/fileutil/test-data/p.ckout to modules/fileutil/test-assets/p.ckout.

cannot compute difference between binary files

Name change from modules/fileutil/test-data/p.fossil to modules/fileutil/test-assets/p.fossil.

cannot compute difference between binary files

Name change from modules/fileutil/test-data/p.global to modules/fileutil/test-assets/p.global.

cannot compute difference between binary files

Name change from modules/fileutil/test-data/p.sqlite to modules/fileutil/test-assets/p.sqlite.

cannot compute difference between binary files

Name change from modules/fileutil/test-data/pdf4tcl_01.pdf to modules/fileutil/test-assets/pdf4tcl_01.pdf.
Changes to modules/fumagic/filetypes.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# -*- tcl -*-
#
# Testing "fumagic" (FileUtil Magic). Filetype recognizer.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2005-2006 by Andreas Kupries <[email protected]>
# All rights reserved.
#
# RCS: @(#) $Id: filetypes.test,v 1.9 2006/10/09 21:41:40 andreas_kupries Exp $

# -------------------------------------------------------------------------

package require tcltest
source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









<
<







1
2
3
4
5
6
7
8
9


10
11
12
13
14
15
16
# -*- tcl -*-
#
# Testing "fumagic" (FileUtil Magic). Filetype recognizer.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2005-2006 by Andreas Kupries <[email protected]>
# All rights reserved.



# -------------------------------------------------------------------------

package require tcltest
source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]
Changes to modules/inifile/inifile.test.
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
testing {
    useLocal ini.tcl inifile
}

#---------------------------------------------------------------------

set inifile [localPath ini.tcl]
set testini [localPath test.ini]
set sampini [localPath sample.ini]

#---------------------------------------------------------------------

test inifile-1.1 {ini::open} {
    set res [ini::open $testini r]
    ini::close $res
    set res







|
|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
testing {
    useLocal ini.tcl inifile
}

#---------------------------------------------------------------------

set inifile [localPath ini.tcl]
set testini [asset test.ini]
set sampini [asset sample.ini]

#---------------------------------------------------------------------

test inifile-1.1 {ini::open} {
    set res [ini::open $testini r]
    ini::close $res
    set res
Name change from modules/inifile/sample.ini to modules/inifile/test-assets/sample.ini.
Name change from modules/inifile/test.ini to modules/inifile/test-assets/test.ini.
Changes to modules/jpeg/jpeg.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
# jpeg.test:  Tests for the JPEG utilities.
#
# Copyright (c) 2008-2013 by Andreas Kupries <[email protected]>
# All rights reserved.
#
# JPEG: @(#) $Id: jpeg.test,v 1.2 2011/05/06 13:39:27 patthoyts Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]






<
<







1
2
3
4
5


6
7
8
9
10
11
12
# -*- tcl -*-
# jpeg.test:  Tests for the JPEG utilities.
#
# Copyright (c) 2008-2013 by Andreas Kupries <[email protected]>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
test jpeg-1.1 {isJPEG error, wrong#args, too many} -body {
    ::jpeg::isJPEG foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::isJPEG} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-2.$n "isJPEG, ok, [file tail $f]" -body {
	::jpeg::isJPEG $f
    } -result 1
    incr n
}

test jpeg-2.$n "isJPEG, fail, [file tail [info script]]" -body {







|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
test jpeg-1.1 {isJPEG error, wrong#args, too many} -body {
    ::jpeg::isJPEG foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::isJPEG} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-2.$n "isJPEG, ok, [file tail $f]" -body {
	::jpeg::isJPEG $f
    } -result 1
    incr n
}

test jpeg-2.$n "isJPEG, fail, [file tail [info script]]" -body {
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
test jpeg-2.1 {imageInfo error, wrong#args, too many} -body {
    ::jpeg::imageInfo foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::imageInfo} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-3.$n "imageInfo regular, [file tail $f]" -body {
	::jpeg::imageInfo $f
    } -result [string trim [fileutil::cat [file rootname $f].info.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-4.$n "imageInfo thumbnails, [file tail $f]" -body {
	::jpeg::imageInfo $f
    } -result {}
    incr n
}

test jpeg-5.0 "imageInfo, fail, [file tail [info script]]" -body {







|







|







89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
test jpeg-2.1 {imageInfo error, wrong#args, too many} -body {
    ::jpeg::imageInfo foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::imageInfo} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-3.$n "imageInfo regular, [file tail $f]" -body {
	::jpeg::imageInfo $f
    } -result [string trim [fileutil::cat [file rootname $f].info.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-4.$n "imageInfo thumbnails, [file tail $f]" -body {
	::jpeg::imageInfo $f
    } -result {}
    incr n
}

test jpeg-5.0 "imageInfo, fail, [file tail [info script]]" -body {
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
test jpeg-6.1 {dimensions error, wrong#args, too many} -body {
    ::jpeg::dimensions foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::dimensions} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-7.$n "dimensions regular, [file tail $f]" -body {
	::jpeg::dimensions $f
    } -result [string trim [fileutil::cat [file rootname $f].WxH.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-8.$n "dimensions thumbnails, [file tail $f]" -body {
	::jpeg::dimensions $f
    } -result {160 120}
    incr n
}

test jpeg-9.0 "dimensions, fail, [file tail [info script]]" -body {







|







|







121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
test jpeg-6.1 {dimensions error, wrong#args, too many} -body {
    ::jpeg::dimensions foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::dimensions} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-7.$n "dimensions regular, [file tail $f]" -body {
	::jpeg::dimensions $f
    } -result [string trim [fileutil::cat [file rootname $f].WxH.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-8.$n "dimensions thumbnails, [file tail $f]" -body {
	::jpeg::dimensions $f
    } -result {160 120}
    incr n
}

test jpeg-9.0 "dimensions, fail, [file tail [info script]]" -body {
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
test jpeg-10.1 {getThumbnail error, wrong#args, too many} -body {
    ::jpeg::getThumbnail foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getThumbnail} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    if {![file exists $f.thumb]} {
	test jpeg-11.$n "getThumbnail - no thumbnail, [file tail $f]" -body {
	    ::jpeg::getThumbnail $f
	} -result {}
    } else {
	test jpeg-11.$n "getThumbnail regular, [file tail $f]" -body {
	    #fileutil::writeFile -translation binary ${f}.x.jpg [::jpeg::getThumbnail $f]
	    # Note: The .thumb files were created from the .JPG files
	    # using 'jhead -st', version 2.6.
	    set expected [fileutil::cat -translation binary ${f}.thumb]
	    set have     [::jpeg::getThumbnail $f]
	    list [string equal $expected $have] [strdiff $expected $have]
	} -result {1 -}
    }

    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-12.$n "getThumbnail thumbnails, [file tail $f]" -body {
	::jpeg::getThumbnail $f
    } -result {}
    incr n
}

test jpeg-13.0 "getThumbnail, fail, [file tail [info script]]" -body {







|



















|







153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
test jpeg-10.1 {getThumbnail error, wrong#args, too many} -body {
    ::jpeg::getThumbnail foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getThumbnail} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    if {![file exists $f.thumb]} {
	test jpeg-11.$n "getThumbnail - no thumbnail, [file tail $f]" -body {
	    ::jpeg::getThumbnail $f
	} -result {}
    } else {
	test jpeg-11.$n "getThumbnail regular, [file tail $f]" -body {
	    #fileutil::writeFile -translation binary ${f}.x.jpg [::jpeg::getThumbnail $f]
	    # Note: The .thumb files were created from the .JPG files
	    # using 'jhead -st', version 2.6.
	    set expected [fileutil::cat -translation binary ${f}.thumb]
	    set have     [::jpeg::getThumbnail $f]
	    list [string equal $expected $have] [strdiff $expected $have]
	} -result {1 -}
    }

    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-12.$n "getThumbnail thumbnails, [file tail $f]" -body {
	::jpeg::getThumbnail $f
    } -result {}
    incr n
}

test jpeg-13.0 "getThumbnail, fail, [file tail [info script]]" -body {
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
test jpeg-16.1 {getComments error, wrong#args, too many} -body {
    ::jpeg::getComments foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getComments} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-17.$n "getComments regular, [file tail $f]" -body {
	::jpeg::getComments $f
    } -result {}
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-18.$n "getComments thumbnails, [file tail $f]" -body {
	::jpeg::getComments $f
    } -result {}
    incr n
}

test jpeg-19.0 "getComments, fail, [file tail [info script]]" -body {







|







|







209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
test jpeg-16.1 {getComments error, wrong#args, too many} -body {
    ::jpeg::getComments foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getComments} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-17.$n "getComments regular, [file tail $f]" -body {
	::jpeg::getComments $f
    } -result {}
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-18.$n "getComments thumbnails, [file tail $f]" -body {
	::jpeg::getComments $f
    } -result {}
    incr n
}

test jpeg-19.0 "getComments, fail, [file tail [info script]]" -body {
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
test jpeg-20.1 {addComment error, wrong#args, not enough} -body {
    ::jpeg::addComment foo
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::addComment} {file comment args} 1]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-21.$n "addComment regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::getComments $fx
    } -cleanup {
	removeFile $fx







|







241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
test jpeg-20.1 {addComment error, wrong#args, not enough} -body {
    ::jpeg::addComment foo
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::addComment} {file comment args} 1]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-21.$n "addComment regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::getComments $fx
    } -cleanup {
	removeFile $fx
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
test jpeg-23.1 {removeComments error, wrong#args, too many} -body {
    ::jpeg::removeComments foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::removeComments} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-24.$n "removeComments regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment     $fx {a b} {c d}
    } -body {
	::jpeg::removeComments $fx
	::jpeg::getComments $fx
    } -cleanup {







|







271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
test jpeg-23.1 {removeComments error, wrong#args, too many} -body {
    ::jpeg::removeComments foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::removeComments} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-24.$n "removeComments regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment     $fx {a b} {c d}
    } -body {
	::jpeg::removeComments $fx
	::jpeg::getComments $fx
    } -cleanup {
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
test jpeg-26.2 {replaceComment error, wrong#args, too many} -body {
    ::jpeg::replaceComment foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::replaceComment} {file comment}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-27.$n "replaceComment regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment      $fx {a b} {c d}
    } -body {
	::jpeg::replaceComment $fx new
	::jpeg::getComments $fx
    } -cleanup {







|







306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
test jpeg-26.2 {replaceComment error, wrong#args, too many} -body {
    ::jpeg::replaceComment foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::replaceComment} {file comment}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-27.$n "replaceComment regular, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment      $fx {a b} {c d}
    } -body {
	::jpeg::replaceComment $fx new
	::jpeg::getComments $fx
    } -cleanup {
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::getExif} {file ?type?} 0]

test jpeg-29.1 {getExif error, wrong#args, too many} -body {
    ::jpeg::getExif foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getExif} {file ?type?}]

test jpeg-29.2 {getExif error, bad section type} -body {
    ::jpeg::getExif [localPath testimages/IMG_7950.JPG] fufara
} -returnCodes error -result {Bad type "fufara", expected one of "main", or "thumbnail"}

test jpeg-29.3 {getExifFromChannel error, wrong#args, not enough} -body {
    ::jpeg::getExifFromChannel
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::getExifFromChannel} {chan ?type?} 0]

test jpeg-29.4 {getExifFromChannel error, wrong#args, too many} -body {
    ::jpeg::getExifFromChannel foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getExifFromChannel} {chan ?type?}]

test jpeg-29.5 {getExifFromChannel error, bad section type} -setup {
    set fd [::jpeg::openJFIF [localPath testimages/IMG_7950.JPG] r]
} -body {
    ::jpeg::getExifFromChannel $fd fufara
} -cleanup {
    close $fd
    unset fd
} -returnCodes error -result {Bad type "fufara", expected one of "main", or "thumbnail"}

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-30.$n "getExif, main section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f]]]
    } -result [string trimright [fileutil::cat [file rootname $f].exif.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-31.$n "getExif, main section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f]]]
    } -result {}
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.JPG] {
    test jpeg-32.$n "getExif, thumbnail section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f thumbnail]]]
    } -result [string trimright [fileutil::cat [file rootname $f].thumbexif.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.thumb] {
    test jpeg-33.$n "getExif, thumbnail section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f thumbnail]]]
    } -result {}
    incr n
}

test jpeg-34.0 "getExif, fail, [file tail [info script]]" -body {







|











|










|







|







|







|







335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::getExif} {file ?type?} 0]

test jpeg-29.1 {getExif error, wrong#args, too many} -body {
    ::jpeg::getExif foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getExif} {file ?type?}]

test jpeg-29.2 {getExif error, bad section type} -body {
    ::jpeg::getExif [asset IMG_7950.JPG] fufara
} -returnCodes error -result {Bad type "fufara", expected one of "main", or "thumbnail"}

test jpeg-29.3 {getExifFromChannel error, wrong#args, not enough} -body {
    ::jpeg::getExifFromChannel
} -returnCodes error -result [tcltest::wrongNumArgs {::jpeg::getExifFromChannel} {chan ?type?} 0]

test jpeg-29.4 {getExifFromChannel error, wrong#args, too many} -body {
    ::jpeg::getExifFromChannel foo bar barf
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::getExifFromChannel} {chan ?type?}]

test jpeg-29.5 {getExifFromChannel error, bad section type} -setup {
    set fd [::jpeg::openJFIF [asset IMG_7950.JPG] r]
} -body {
    ::jpeg::getExifFromChannel $fd fufara
} -cleanup {
    close $fd
    unset fd
} -returnCodes error -result {Bad type "fufara", expected one of "main", or "thumbnail"}

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-30.$n "getExif, main section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f]]]
    } -result [string trimright [fileutil::cat [file rootname $f].exif.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-31.$n "getExif, main section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f]]]
    } -result {}
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.JPG] {
    test jpeg-32.$n "getExif, thumbnail section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f thumbnail]]]
    } -result [string trimright [fileutil::cat [file rootname $f].thumbexif.txt]]
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.thumb] {
    test jpeg-33.$n "getExif, thumbnail section, $f" -body {
	dictsort [fixupdata [::jpeg::formatExif [::jpeg::getExif $f thumbnail]]]
    } -result {}
    incr n
}

test jpeg-34.0 "getExif, fail, [file tail [info script]]" -body {
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
test jpeg-34.1 {removeExif error, wrong#args, too many} -body {
    ::jpeg::removeExif foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::removeExif} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-35.$n "removeExif ok, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::removeExif $fx
	set res [list [::jpeg::getComments $fx] [::jpeg::getExif $fx] [::jpeg::getExif $fx thumbnail]]
    } -cleanup {







|







417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
test jpeg-34.1 {removeExif error, wrong#args, too many} -body {
    ::jpeg::removeExif foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::removeExif} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-35.$n "removeExif ok, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::removeExif $fx
	set res [list [::jpeg::getComments $fx] [::jpeg::getExif $fx] [::jpeg::getExif $fx thumbnail]]
    } -cleanup {
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
test jpeg-37.1 {stripJPEG error, wrong#args, too many} -body {
    ::jpeg::stripJPEG foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::stripJPEG} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-38.$n "stripJPEG ok, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::stripJPEG $fx
	set res [list [::jpeg::getComments $fx] [::jpeg::getExif $fx] [::jpeg::getExif $fx thumbnail]]
    } -cleanup {







|







448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
test jpeg-37.1 {stripJPEG error, wrong#args, too many} -body {
    ::jpeg::stripJPEG foo bar
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::stripJPEG} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-38.$n "stripJPEG ok, [file tail $f]" -setup {
	file copy -force $f [set fx [makeFile {} jtmp]]
	::jpeg::addComment $fx {a b} {c d}
    } -body {
	::jpeg::stripJPEG $fx
	set res [list [::jpeg::getComments $fx] [::jpeg::getExif $fx] [::jpeg::getExif $fx thumbnail]]
    } -cleanup {
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::debug} {file}]

# -------------------------------------------------------------------------
# We do not try to actually run 'debug', because it prints its results
# to stdout. This may change when we can capture stdout as test result

set n 0
foreach f [TestFilesGlob testimages/*JPG*] {
    test jpeg-41.$n "debug ok, [file tail $f]" -constraints donotrun -body {
	::jpeg::debug $f
    } -result {}
    incr n
}

test jpeg-42.0 "debug, fail, [file tail [info script]]" -body {
    ::jpeg::debug [info script]
} -returnCodes error -result {not a jpg file}

# -------------------------------------------------------------------------
rename strdiff {}
testsuiteCleanup







|













481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
} -returnCodes error -result [tcltest::tooManyArgs {::jpeg::debug} {file}]

# -------------------------------------------------------------------------
# We do not try to actually run 'debug', because it prints its results
# to stdout. This may change when we can capture stdout as test result

set n 0
foreach f [TestFilesGlob test-assets/*JPG*] {
    test jpeg-41.$n "debug ok, [file tail $f]" -constraints donotrun -body {
	::jpeg::debug $f
    } -result {}
    incr n
}

test jpeg-42.0 "debug, fail, [file tail [info script]]" -body {
    ::jpeg::debug [info script]
} -returnCodes error -result {not a jpg file}

# -------------------------------------------------------------------------
rename strdiff {}
testsuiteCleanup
Name change from modules/jpeg/testimages/1000.JPG to modules/jpeg/test-assets/1000.JPG.

cannot compute difference between binary files

Name change from modules/jpeg/testimages/1000.WxH.txt to modules/jpeg/test-assets/1000.WxH.txt.
Name change from modules/jpeg/testimages/1000.exif.txt to modules/jpeg/test-assets/1000.exif.txt.
Name change from modules/jpeg/testimages/1000.info.txt to modules/jpeg/test-assets/1000.info.txt.
Name change from modules/jpeg/testimages/1000.thumbexif.txt to modules/jpeg/test-assets/1000.thumbexif.txt.
Name change from modules/jpeg/testimages/IMG_7898.JPG to modules/jpeg/test-assets/IMG_7898.JPG.

cannot compute difference between binary files

Name change from modules/jpeg/testimages/IMG_7898.JPG.thumb to modules/jpeg/test-assets/IMG_7898.JPG.thumb.

cannot compute difference between binary files

Name change from modules/jpeg/testimages/IMG_7898.WxH.txt to modules/jpeg/test-assets/IMG_7898.WxH.txt.
Name change from modules/jpeg/testimages/IMG_7898.exif.txt to modules/jpeg/test-assets/IMG_7898.exif.txt.
Name change from modules/jpeg/testimages/IMG_7898.info.txt to modules/jpeg/test-assets/IMG_7898.info.txt.
Name change from modules/jpeg/testimages/IMG_7898.thumbexif.txt to modules/jpeg/test-assets/IMG_7898.thumbexif.txt.
Name change from modules/jpeg/testimages/IMG_7917.JPG to modules/jpeg/test-assets/IMG_7917.JPG.

cannot compute difference between binary files

Name change from modules/jpeg/testimages/IMG_7917.JPG.thumb to modules/jpeg/test-assets/IMG_7917.JPG.thumb.

cannot compute difference between binary files

Name change from modules/jpeg/testimages/IMG_7917.WxH.txt to modules/jpeg/test-assets/IMG_7917.WxH.txt.
Name change from modules/jpeg/testimages/IMG_7917.exif.txt to modules/jpeg/test-assets/IMG_7917.exif.txt.
Name change from modules/jpeg/testimages/IMG_7917.info.txt to modules/jpeg/test-assets/IMG_7917.info.txt.
Name change from modules/jpeg/testimages/IMG_7917.thumbexif.txt to modules/jpeg/test-assets/IMG_7917.thumbexif.txt.
Name change from modules/jpeg/testimages/IMG_7950.JPG to modules/jpeg/test-assets/IMG_7950.JPG.

cannot compute difference between binary files

Name change from modules/jpeg/testimages/IMG_7950.JPG.thumb to modules/jpeg/test-assets/IMG_7950.JPG.thumb.

cannot compute difference between binary files

Name change from modules/jpeg/testimages/IMG_7950.WxH.txt to modules/jpeg/test-assets/IMG_7950.WxH.txt.
Name change from modules/jpeg/testimages/IMG_7950.exif.txt to modules/jpeg/test-assets/IMG_7950.exif.txt.
Name change from modules/jpeg/testimages/IMG_7950.info.txt to modules/jpeg/test-assets/IMG_7950.info.txt.
Name change from modules/jpeg/testimages/IMG_7950.thumbexif.txt to modules/jpeg/test-assets/IMG_7950.thumbexif.txt.
Name change from modules/jpeg/testimages/IMG_7950_none.JPG to modules/jpeg/test-assets/IMG_7950_none.JPG.

cannot compute difference between binary files

Name change from modules/jpeg/testimages/IMG_7950_none.WxH.txt to modules/jpeg/test-assets/IMG_7950_none.WxH.txt.
Name change from modules/jpeg/testimages/IMG_7950_none.exif.txt to modules/jpeg/test-assets/IMG_7950_none.exif.txt.
Name change from modules/jpeg/testimages/IMG_7950_none.info.txt to modules/jpeg/test-assets/IMG_7950_none.info.txt.
Name change from modules/jpeg/testimages/IMG_7950_none.thumbexif.txt to modules/jpeg/test-assets/IMG_7950_none.thumbexif.txt.
Changes to modules/ldap/ldap.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# ldap.test - Copyright (C) 2006 Michael Schlenker <[email protected]>
#
# Tests for the Tcllib ldap package
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------
# RCS: @(#) $Id: ldap.test,v 1.5 2008/07/20 19:50:55 mic42 Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

testing {
    useLocal ldap.tcl ldap
    useLocal ../asn/asn.tcl asn
}


namespace import ::asn::*

# -------------------------------------------------------------------------
# Tests








<












|







1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# ldap.test - Copyright (C) 2006 Michael Schlenker <[email protected]>
#
# Tests for the Tcllib ldap package
#
# -------------------------------------------------------------------------
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# -------------------------------------------------------------------------


# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

testsNeedTcl     8.4
testsNeedTcltest 2.0

testing {
    useLocal ldap.tcl ldap
    use      asn/asn.tcl asn
}


namespace import ::asn::*

# -------------------------------------------------------------------------
# Tests
Changes to modules/ldap/ldapx.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# ldapx.test:  tests for the ldapx module.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2006 by Pierre David <[email protected]>
# All rights reserved.
#
# $Id: ldapx.test,v 1.6 2007/08/19 20:20:43 pdav Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









<
<







1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# ldapx.test:  tests for the ldapx module.
#
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
# Copyright (c) 2006 by Pierre David <[email protected]>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
} {}


# -------------------------------------------------------------------------

test ldax-d6c9cfba {ldapx continuation line handling} {
    ::ldapx::ldif create ldin
    ldin channel [open $::tcltest::testsDirectory/data/d6c9cfba.ldif r]
    ::ldapx::entry create entr

    ldin read entr
    set r [entr get1 files]

    entr destroy
    ldin destroy







|







369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
} {}


# -------------------------------------------------------------------------

test ldax-d6c9cfba {ldapx continuation line handling} {
    ::ldapx::ldif create ldin
    ldin channel [open [asset d6c9cfba.ldif] r]
    ::ldapx::entry create entr

    ldin read entr
    set r [entr get1 files]

    entr destroy
    ldin destroy
Name change from modules/ldap/data/d6c9cfba.ldif to modules/ldap/test-assets/d6c9cfba.ldif.
modules/mapproj/ChangeLog became a regular file.
modules/mapproj/mapproj.man became a regular file.
modules/mapproj/mapproj.tcl became a regular file.
modules/mapproj/pkgIndex.tcl became a regular file.
modules/math/TODO became a regular file.
modules/math/bessel.tcl became a regular file.
modules/math/bessel.test became a regular file.
modules/math/bigfloat.tcl became a regular file.
modules/math/bigfloat.test became a regular file.
modules/math/bignum.tcl became a regular file.
modules/math/bignum.test became a regular file.
modules/math/calculus.CHANGES became a regular file.
modules/math/calculus.README became a regular file.
modules/math/calculus.doc became a regular file.
modules/math/calculus.tcl became a regular file.
modules/math/calculus.test became a regular file.
modules/math/calculus.testscript became a regular file.
modules/math/classic_polyns.tcl became a regular file.
modules/math/constants.tcl became a regular file.
modules/math/constants.test became a regular file.
modules/math/decimal.tcl became a regular file.
modules/math/decimal.test became a regular file.
modules/math/elliptic.tcl became a regular file.
modules/math/elliptic.test became a regular file.
modules/math/exponential.tcl became a regular file.
modules/math/fourier.tcl became a regular file.
modules/math/fourier.test became a regular file.
modules/math/fuzzy.eps.f90 became a regular file.
modules/math/fuzzy.tcl became a regular file.
modules/math/fuzzy.test became a regular file.
modules/math/fuzzy.testscript became a regular file.
modules/math/interpolate.tcl became a regular file.
modules/math/interpolate.test became a regular file.
modules/math/kruskal.tcl became a regular file.
modules/math/linalg.tcl became a regular file.
modules/math/linalg.test became a regular file.
modules/math/liststat.tcl became a regular file.
modules/math/machineparameters.tcl became a regular file.
modules/math/machineparameters.test became a regular file.
modules/math/mvlinreg.tcl became a regular file.
modules/math/optimize.tcl became a regular file.
modules/math/optimize.test became a regular file.
modules/math/pdf_stat.tcl became a regular file.
modules/math/plotstat.tcl became a regular file.
modules/math/polynomials.tcl became a regular file.
modules/math/polynomials.test became a regular file.
modules/math/qcomplex.tcl became a regular file.
modules/math/qcomplex.test became a regular file.
modules/math/rational_funcs.tcl became a regular file.
modules/math/roman.test became a regular file.
modules/math/romannumerals.tcl became a regular file.
modules/math/special.tcl became a regular file.
modules/math/special.test became a regular file.
modules/math/statistics.tcl became a regular file.
modules/math/statistics.test became a regular file.
modules/math/wilcoxon.tcl became a regular file.
Changes to modules/ncgi/ncgi.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- tcl -*-
# Tests for the cgi module.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions
#
# RCS: @(#) $Id: ncgi.test,v 1.28 2012/05/03 17:56:07 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]









<
<







1
2
3
4
5
6
7
8


9
10
11
12
13
14
15
# -*- tcl -*-
# Tests for the cgi module.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1998-2000 by Ajuba Solutions



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

586
587
588
589
590
591
592
593
594
595
596
597
598
599
600

test ncgi-14.2 {ncgi::multipart} {
    catch {ncgi::multipart "multipart/form-data" {}} err
    set err
} {No boundary given for multipart document}

test ncgi-14.3 {ncgi::multipart} {
    set in [open [file join [file dirname [info script]] formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}







|







584
585
586
587
588
589
590
591
592
593
594
595
596
597
598

test ncgi-14.2 {ncgi::multipart} {
    catch {ncgi::multipart "multipart/form-data" {}} err
    set err
} {No boundary given for multipart document}

test ncgi-14.3 {ncgi::multipart} {
    set in [open [asset formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
                                         User Guide
</h1></center>


}}}

test ncgi-14.4 {ncgi::multipart} {
    set in [open [file join [file dirname [info script]] formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}







|







610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
                                         User Guide
</h1></center>


}}}

test ncgi-14.4 {ncgi::multipart} {
    set in [open [asset formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
</h1></center>


}}


test ncgi-14.6 {ncgi::multipart setValue} {
    set in [open [file join [file dirname [info script]] formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}







|







638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
</h1></center>


}}


test ncgi-14.6 {ncgi::multipart setValue} {
    set in [open [asset formdata.txt]]
    set X [read $in]
    close $in

    foreach line [split $X \n] {
	if {[string length $line] == 0} {
	    break
	}
Name change from modules/ncgi/formdata.txt to modules/ncgi/test-assets/formdata.txt.
modules/nmea/nmea.tcl became a regular file.
Changes to modules/png/png.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- tcl -*-
# png.test:  tests for png decoding and manipulation.
#
# Copyright (c) 2004 by Andreas Kupries <[email protected]>
#
# RCS: @(#) $Id: png.test,v 1.10 2007/04/30 22:47:14 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]





<
<







1
2
3
4


5
6
7
8
9
10
11
# -*- tcl -*-
# png.test:  tests for png decoding and manipulation.
#
# Copyright (c) 2004 by Andreas Kupries <[email protected]>



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
testing {
    useLocal png.tcl png
}

# -------------------------------------------------------------------------
# Validation

foreach f [TestFilesGlob testimages/*.png] {
    set root [file rootname [file tail $f]]

    # All files have a valid signature, except for two.

    test png-ispng-$root {is png} {
	::png::isPNG $f
    } [expr {







|







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
testing {
    useLocal png.tcl png
}

# -------------------------------------------------------------------------
# Validation

foreach f [TestFilesGlob test-assets/*.png] {
    set root [file rootname [file tail $f]]

    # All files have a valid signature, except for two.

    test png-ispng-$root {is png} {
	::png::isPNG $f
    } [expr {
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    test png-validate-$root {full validation} {
	::png::validate $f
    } OK ;# {}
}

# Validation II, the bad files ...

foreach f [TestFilesGlob testimages/x*.png] {
    set root [file rootname [file tail $f]]

    test png-validate-$root {full validation} {
	::png::validate $f
    } [expr {[string match x00n0g01 $root] ? "NODATA" : "SIG"}] ;# {}
}








|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
    test png-validate-$root {full validation} {
	::png::validate $f
    } OK ;# {}
}

# Validation II, the bad files ...

foreach f [TestFilesGlob test-assets/x*.png] {
    set root [file rootname [file tail $f]]

    test png-validate-$root {full validation} {
	::png::validate $f
    } [expr {[string match x00n0g01 $root] ? "NODATA" : "SIG"}] ;# {}
}

213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
    tp1n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z00n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z03n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z06n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z09n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
}

foreach f [TestFilesGlob testimages/*.png] {
    set root [file rootname [file tail $f]]

    # Files beginning with x are invalid, and thus not usable in these
    # tests.

    if {[string match x* $root]} continue








|







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
    tp1n3p08 {color 3 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z00n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z03n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z06n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
    z09n2c08 {color 2 compression 0 depth 8 filter 0 height 32 interlace 0 width 32}
}

foreach f [TestFilesGlob test-assets/*.png] {
    set root [file rootname [file tail $f]]

    # Files beginning with x are invalid, and thus not usable in these
    # tests.

    if {[string match x* $root]} continue

235
236
237
238
239
240
241
242
243
244
245
246
247
248
249

array set exptime {
    cm0n0g04 946730096
    cm7n0g04 0
    cm9n0g04 946684799
}

foreach f [TestFilesGlob testimages/cm*.png] {
    set root [file rootname [file tail $f]]

    #puts [clock format $exptime($root) -gmt 1]

    test png-gettimestamp-$root {retrieve timestamp} {
	::png::getTimestamp $f
    } $exptime($root) ; # {}







|







233
234
235
236
237
238
239
240
241
242
243
244
245
246
247

array set exptime {
    cm0n0g04 946730096
    cm7n0g04 0
    cm9n0g04 946684799
}

foreach f [TestFilesGlob test-assets/cm*.png] {
    set root [file rootname [file tail $f]]

    #puts [clock format $exptime($root) -gmt 1]

    test png-gettimestamp-$root {retrieve timestamp} {
	::png::getTimestamp $f
    } $exptime($root) ; # {}
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
to the spec are present.}} {Software {Created on a NeXTstation color using "pnmtopng".}} {Disclaimer Freeware.}}   
    ctzn0g04 {{Title PngSuite} {Author {Willem A.J. van Schaik
([email protected])}}}
}

# - Retrieval

foreach f [TestFilesGlob testimages/*.png] {
    set root [file rootname [file tail $f]]

    # All files have a valid signature, except for two. These we ignore.
    if {[string equal $root xcrn0g04]} continue
    if {[string equal $root xlfn0g04]} continue
    # All files are fully valid, except for all beginning with an
    # 'x'. We ignore them as well.







|







259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
to the spec are present.}} {Software {Created on a NeXTstation color using "pnmtopng".}} {Disclaimer Freeware.}}   
    ctzn0g04 {{Title PngSuite} {Author {Willem A.J. van Schaik
([email protected])}}}
}

# - Retrieval

foreach f [TestFilesGlob test-assets/*.png] {
    set root [file rootname [file tail $f]]

    # All files have a valid signature, except for two. These we ignore.
    if {[string equal $root xcrn0g04]} continue
    if {[string equal $root xlfn0g04]} continue
    # All files are fully valid, except for all beginning with an
    # 'x'. We ignore them as well.
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# - Removal

# Note: For a bad removeComments tests fail only on platforms where
# the system encoding is not ASCII like, or the EOL is not a plain
# LF. Windows for example, or asian systems.

foreach root [array names comex] {
    set f [localPath testimages/${root}.png]

    test png-removecomment-$root {remove comments} {
	set copy [makeFile {} pngrc.$root]
	file copy -force $f $copy

	::png::removeComments $copy
	set res [list [::png::validate $copy] [::png::getComments $copy]]
	removeFile pngrc.$root
	set res
    } {OK {}}
}

# -------------------------------------------------------------------------
# PhysicalDimensions

test png-physical-dimensions-missing {Test for empty list if no physical dimensions present} {
    ::png::getPixelDimension [file join\
	    [file dirname [file join [pwd] [info script]]]\
	    testimages/physicaldimensions/basi0g01.png]
} {}

test png-physical-dimensions-present {Test to extract physical dimensions} {
    ::png::getPixelDimension [file join\
	    [file dirname [file join [pwd] [info script]]]\
	    testimages/physicaldimensions/basi0g01_300dpi.png]
} {ppux 11811 ppuy 11811 unit meter}

# -------------------------------------------------------------------------
testsuiteCleanup







|
















|
<
<



|
<
<




283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307


308
309
310
311


312
313
314
315
# - Removal

# Note: For a bad removeComments tests fail only on platforms where
# the system encoding is not ASCII like, or the EOL is not a plain
# LF. Windows for example, or asian systems.

foreach root [array names comex] {
    set f [asset ${root}.png]

    test png-removecomment-$root {remove comments} {
	set copy [makeFile {} pngrc.$root]
	file copy -force $f $copy

	::png::removeComments $copy
	set res [list [::png::validate $copy] [::png::getComments $copy]]
	removeFile pngrc.$root
	set res
    } {OK {}}
}

# -------------------------------------------------------------------------
# PhysicalDimensions

test png-physical-dimensions-missing {Test for empty list if no physical dimensions present} {
    ::png::getPixelDimension [asset physicaldimensions/basi0g01.png]


} {}

test png-physical-dimensions-present {Test to extract physical dimensions} {
    ::png::getPixelDimension [asset physicaldimensions/basi0g01_300dpi.png]


} {ppux 11811 ppuy 11811 unit meter}

# -------------------------------------------------------------------------
testsuiteCleanup
Name change from modules/png/testimages/basi0g01.png to modules/png/test-assets/basi0g01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi0g02.png to modules/png/test-assets/basi0g02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi0g04.png to modules/png/test-assets/basi0g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi0g08.png to modules/png/test-assets/basi0g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi0g16.png to modules/png/test-assets/basi0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi2c08.png to modules/png/test-assets/basi2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi2c16.png to modules/png/test-assets/basi2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi3p01.png to modules/png/test-assets/basi3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi3p02.png to modules/png/test-assets/basi3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi3p04.png to modules/png/test-assets/basi3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi3p08.png to modules/png/test-assets/basi3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi4a08.png to modules/png/test-assets/basi4a08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi4a16.png to modules/png/test-assets/basi4a16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi6a08.png to modules/png/test-assets/basi6a08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basi6a16.png to modules/png/test-assets/basi6a16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn0g01.png to modules/png/test-assets/basn0g01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn0g02.png to modules/png/test-assets/basn0g02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn0g04.png to modules/png/test-assets/basn0g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn0g08.png to modules/png/test-assets/basn0g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn0g16.png to modules/png/test-assets/basn0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn2c08.png to modules/png/test-assets/basn2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn2c16.png to modules/png/test-assets/basn2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn3p01.png to modules/png/test-assets/basn3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn3p02.png to modules/png/test-assets/basn3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn3p04.png to modules/png/test-assets/basn3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn3p08.png to modules/png/test-assets/basn3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn4a08.png to modules/png/test-assets/basn4a08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn4a16.png to modules/png/test-assets/basn4a16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn6a08.png to modules/png/test-assets/basn6a08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/basn6a16.png to modules/png/test-assets/basn6a16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/bgai4a08.png to modules/png/test-assets/bgai4a08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/bgai4a16.png to modules/png/test-assets/bgai4a16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/bgan6a08.png to modules/png/test-assets/bgan6a08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/bgan6a16.png to modules/png/test-assets/bgan6a16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/bgbn4a08.png to modules/png/test-assets/bgbn4a08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/bggn4a16.png to modules/png/test-assets/bggn4a16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/bgwn6a08.png to modules/png/test-assets/bgwn6a08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/bgyn6a16.png to modules/png/test-assets/bgyn6a16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ccwn2c08.png to modules/png/test-assets/ccwn2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ccwn3p08.png to modules/png/test-assets/ccwn3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cdfn2c08.png to modules/png/test-assets/cdfn2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cdhn2c08.png to modules/png/test-assets/cdhn2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cdsn2c08.png to modules/png/test-assets/cdsn2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cdun2c08.png to modules/png/test-assets/cdun2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ch1n3p04.png to modules/png/test-assets/ch1n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ch2n3p08.png to modules/png/test-assets/ch2n3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cm0n0g04.png to modules/png/test-assets/cm0n0g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cm7n0g04.png to modules/png/test-assets/cm7n0g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cm9n0g04.png to modules/png/test-assets/cm9n0g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cs3n2c16.png to modules/png/test-assets/cs3n2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cs3n3p08.png to modules/png/test-assets/cs3n3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cs5n2c08.png to modules/png/test-assets/cs5n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cs5n3p08.png to modules/png/test-assets/cs5n3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cs8n2c08.png to modules/png/test-assets/cs8n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/cs8n3p08.png to modules/png/test-assets/cs8n3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ct0n0g04.png to modules/png/test-assets/ct0n0g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ct1n0g04.png to modules/png/test-assets/ct1n0g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ctzn0g04.png to modules/png/test-assets/ctzn0g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f00n0g08.png to modules/png/test-assets/f00n0g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f00n2c08.png to modules/png/test-assets/f00n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f01n0g08.png to modules/png/test-assets/f01n0g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f01n2c08.png to modules/png/test-assets/f01n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f02n0g08.png to modules/png/test-assets/f02n0g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f02n2c08.png to modules/png/test-assets/f02n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f03n0g08.png to modules/png/test-assets/f03n0g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f03n2c08.png to modules/png/test-assets/f03n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f04n0g08.png to modules/png/test-assets/f04n0g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/f04n2c08.png to modules/png/test-assets/f04n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g03n0g16.png to modules/png/test-assets/g03n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g03n2c08.png to modules/png/test-assets/g03n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g03n3p04.png to modules/png/test-assets/g03n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g04n0g16.png to modules/png/test-assets/g04n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g04n2c08.png to modules/png/test-assets/g04n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g04n3p04.png to modules/png/test-assets/g04n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g05n0g16.png to modules/png/test-assets/g05n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g05n2c08.png to modules/png/test-assets/g05n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g05n3p04.png to modules/png/test-assets/g05n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g07n0g16.png to modules/png/test-assets/g07n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g07n2c08.png to modules/png/test-assets/g07n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g07n3p04.png to modules/png/test-assets/g07n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g10n0g16.png to modules/png/test-assets/g10n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g10n2c08.png to modules/png/test-assets/g10n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g10n3p04.png to modules/png/test-assets/g10n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g25n0g16.png to modules/png/test-assets/g25n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g25n2c08.png to modules/png/test-assets/g25n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/g25n3p04.png to modules/png/test-assets/g25n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/oi1n0g16.png to modules/png/test-assets/oi1n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/oi1n2c16.png to modules/png/test-assets/oi1n2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/oi2n0g16.png to modules/png/test-assets/oi2n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/oi2n2c16.png to modules/png/test-assets/oi2n2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/oi4n0g16.png to modules/png/test-assets/oi4n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/oi4n2c16.png to modules/png/test-assets/oi4n2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/oi9n0g16.png to modules/png/test-assets/oi9n0g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/oi9n2c16.png to modules/png/test-assets/oi9n2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/physicaldimensions/basi0g01.png to modules/png/test-assets/physicaldimensions/basi0g01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/physicaldimensions/basi0g01_300dpi.png to modules/png/test-assets/physicaldimensions/basi0g01_300dpi.png.

cannot compute difference between binary files

Name change from modules/png/testimages/pngsuite.doc to modules/png/test-assets/pngsuite.doc.
Name change from modules/png/testimages/pngsuite_logo.png to modules/png/test-assets/pngsuite_logo.png.

cannot compute difference between binary files

Name change from modules/png/testimages/pp0n2c16.png to modules/png/test-assets/pp0n2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/pp0n6a08.png to modules/png/test-assets/pp0n6a08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ps1n0g08.png to modules/png/test-assets/ps1n0g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ps1n2c16.png to modules/png/test-assets/ps1n2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ps2n0g08.png to modules/png/test-assets/ps2n0g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/ps2n2c16.png to modules/png/test-assets/ps2n2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s01i3p01.png to modules/png/test-assets/s01i3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s01n3p01.png to modules/png/test-assets/s01n3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s02i3p01.png to modules/png/test-assets/s02i3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s02n3p01.png to modules/png/test-assets/s02n3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s03i3p01.png to modules/png/test-assets/s03i3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s03n3p01.png to modules/png/test-assets/s03n3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s04i3p01.png to modules/png/test-assets/s04i3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s04n3p01.png to modules/png/test-assets/s04n3p01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s05i3p02.png to modules/png/test-assets/s05i3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s05n3p02.png to modules/png/test-assets/s05n3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s06i3p02.png to modules/png/test-assets/s06i3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s06n3p02.png to modules/png/test-assets/s06n3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s07i3p02.png to modules/png/test-assets/s07i3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s07n3p02.png to modules/png/test-assets/s07n3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s08i3p02.png to modules/png/test-assets/s08i3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s08n3p02.png to modules/png/test-assets/s08n3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s09i3p02.png to modules/png/test-assets/s09i3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s09n3p02.png to modules/png/test-assets/s09n3p02.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s32i3p04.png to modules/png/test-assets/s32i3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s32n3p04.png to modules/png/test-assets/s32n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s33i3p04.png to modules/png/test-assets/s33i3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s33n3p04.png to modules/png/test-assets/s33n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s34i3p04.png to modules/png/test-assets/s34i3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s34n3p04.png to modules/png/test-assets/s34n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s35i3p04.png to modules/png/test-assets/s35i3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s35n3p04.png to modules/png/test-assets/s35n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s36i3p04.png to modules/png/test-assets/s36i3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s36n3p04.png to modules/png/test-assets/s36n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s37i3p04.png to modules/png/test-assets/s37i3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s37n3p04.png to modules/png/test-assets/s37n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s38i3p04.png to modules/png/test-assets/s38i3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s38n3p04.png to modules/png/test-assets/s38n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s39i3p04.png to modules/png/test-assets/s39i3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s39n3p04.png to modules/png/test-assets/s39n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s40i3p04.png to modules/png/test-assets/s40i3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/s40n3p04.png to modules/png/test-assets/s40n3p04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tbbn1g04.png to modules/png/test-assets/tbbn1g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tbbn2c16.png to modules/png/test-assets/tbbn2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tbbn3p08.png to modules/png/test-assets/tbbn3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tbgn2c16.png to modules/png/test-assets/tbgn2c16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tbgn3p08.png to modules/png/test-assets/tbgn3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tbrn2c08.png to modules/png/test-assets/tbrn2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tbwn1g16.png to modules/png/test-assets/tbwn1g16.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tbwn3p08.png to modules/png/test-assets/tbwn3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tbyn3p08.png to modules/png/test-assets/tbyn3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tp0n1g08.png to modules/png/test-assets/tp0n1g08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tp0n2c08.png to modules/png/test-assets/tp0n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tp0n3p08.png to modules/png/test-assets/tp0n3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/tp1n3p08.png to modules/png/test-assets/tp1n3p08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/x00n0g01.png to modules/png/test-assets/x00n0g01.png.

cannot compute difference between binary files

Name change from modules/png/testimages/xcrn0g04.png to modules/png/test-assets/xcrn0g04.png.

cannot compute difference between binary files

Name change from modules/png/testimages/xlfn0g04.png to modules/png/test-assets/xlfn0g04.png.
Name change from modules/png/testimages/z00n2c08.png to modules/png/test-assets/z00n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/z03n2c08.png to modules/png/test-assets/z03n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/z06n2c08.png to modules/png/test-assets/z06n2c08.png.

cannot compute difference between binary files

Name change from modules/png/testimages/z09n2c08.png to modules/png/test-assets/z09n2c08.png.

cannot compute difference between binary files

modules/simulation/ChangeLog became a regular file.
modules/simulation/annealing.man became a regular file.
modules/simulation/annealing.tcl became a regular file.
modules/simulation/montecarlo.man became a regular file.
modules/simulation/montecarlo.tcl became a regular file.
modules/simulation/pkgIndex.tcl became a regular file.
modules/simulation/random.tcl became a regular file.
modules/simulation/random.test became a regular file.
Name change from modules/tiff/testimages/IMG_7898.tiff to modules/tiff/test-assets/IMG_7898.tiff.

cannot compute difference between binary files

Name change from modules/tiff/testimages/IMG_7917.tiff to modules/tiff/test-assets/IMG_7917.tiff.

cannot compute difference between binary files

Name change from modules/tiff/testimages/IMG_7950.tiff to modules/tiff/test-assets/IMG_7950.tiff.

cannot compute difference between binary files

Changes to modules/tiff/tiff.test.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- tcl -*-
# tiff.test:  Tests for the TIFF utilities.
#
# Copyright (c) 2008 by Andreas Kupries <[email protected]>
# All rights reserved.
#
# TIFF: @(#) $Id: tiff.test,v 1.1 2008/03/24 03:48:59 andreas_kupries Exp $

# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]






<
<







1
2
3
4
5


6
7
8
9
10
11
12
# -*- tcl -*-
# tiff.test:  Tests for the TIFF utilities.
#
# Copyright (c) 2008 by Andreas Kupries <[email protected]>
# All rights reserved.



# -------------------------------------------------------------------------

source [file join \
	[file dirname [file dirname [file join [pwd] [info script]]]] \
	devtools testutilities.tcl]

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
    catch {::tiff::isTIFF foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::isTIFF} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-2.$n "isTIFF, ok, [file tail $f]" {
	::tiff::isTIFF $f
    } 1
    incr n
}

test tiff-2.$n "isTIFF, fail, [file tail [info script]]" {







|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
    catch {::tiff::isTIFF foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::isTIFF} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-2.$n "isTIFF, ok, [file tail $f]" {
	::tiff::isTIFF $f
    } 1
    incr n
}

test tiff-2.$n "isTIFF, fail, [file tail [info script]]" {
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    catch {::tiff::byteOrder foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::byteOrder} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-4.$n "byteOrder regular, [file tail $f]" {
	::tiff::byteOrder $f
    } little
    incr n
}

test tiff-5.0 "byteOrder, fail, [file tail [info script]]" {







|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
    catch {::tiff::byteOrder foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::byteOrder} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-4.$n "byteOrder regular, [file tail $f]" {
	::tiff::byteOrder $f
    } little
    incr n
}

test tiff-5.0 "byteOrder, fail, [file tail [info script]]" {
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    catch {::tiff::numImages foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::numImages} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-7.$n "numImages regular, [file tail $f]" {
	::tiff::numImages $f
    } 1
    incr n
}

test tiff-8.0 "numImages, fail, [file tail [info script]]" {







|







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
    catch {::tiff::numImages foo bar} msg
    set msg
} [tcltest::tooManyArgs {::tiff::numImages} {file}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-7.$n "numImages regular, [file tail $f]" {
	::tiff::numImages $f
    } 1
    incr n
}

test tiff-8.0 "numImages, fail, [file tail [info script]]" {
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
    catch {::tiff::dimensions foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::dimensions} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-10.$n "dimensions regular, [file tail $f]" {
	::tiff::dimensions $f
    } {320 240}
    incr n
}

test tiff-11.0 "dimensions, fail, [file tail [info script]]" {







|







120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    catch {::tiff::dimensions foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::dimensions} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-10.$n "dimensions regular, [file tail $f]" {
	::tiff::dimensions $f
    } {320 240}
    incr n
}

test tiff-11.0 "dimensions, fail, [file tail [info script]]" {
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
    catch {::tiff::imageInfo foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::imageInfo} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-13.$n "imageInfo regular, [file tail $f]" {
	dictsort [::tiff::imageInfo $f]
    } {Artist {} BitsPerSample {8 8 8} Compression 7 DateTime {} HostComputer {} ImageDescription {} ImageLength 240 ImageWidth 320 Orientation 1 PhotometricInterpretation 2 ResolutionUnit 2 XResolution 180 YResolution 180}
    incr n
}

test tiff-14.0 "imageInfo, fail, [file tail [info script]]" {







|







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
    catch {::tiff::imageInfo foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::imageInfo} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-13.$n "imageInfo regular, [file tail $f]" {
	dictsort [::tiff::imageInfo $f]
    } {Artist {} BitsPerSample {8 8 8} Compression 7 DateTime {} HostComputer {} ImageDescription {} ImageLength 240 ImageWidth 320 Orientation 1 PhotometricInterpretation 2 ResolutionUnit 2 XResolution 180 YResolution 180}
    incr n
}

test tiff-14.0 "imageInfo, fail, [file tail [info script]]" {
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
    catch {::tiff::entries foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::entries} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-16.$n "entries regular, [file tail $f]" {
	lsort [::tiff::entries $f]
    } {BitsPerSample Compression DocumentName FillOrder ImageLength ImageWidth JPEGTables Orientation PhotometricInterpretation PlanarConfiguration ResolutionUnit RowsPerStrip SamplesPerPixel Software StripByteCounts StripOffsets XResolution YCbCrSubSampling YResolution}
    incr n
}

test tiff-17.0 "entries, fail, [file tail [info script]]" {







|







172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
    catch {::tiff::entries foo bar glop} msg
    set msg
} [tcltest::tooManyArgs {::tiff::entries} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-16.$n "entries regular, [file tail $f]" {
	lsort [::tiff::entries $f]
    } {BitsPerSample Compression DocumentName FillOrder ImageLength ImageWidth JPEGTables Orientation PhotometricInterpretation PlanarConfiguration ResolutionUnit RowsPerStrip SamplesPerPixel Software StripByteCounts StripOffsets XResolution YCbCrSubSampling YResolution}
    incr n
}

test tiff-17.0 "entries, fail, [file tail [info script]]" {
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
    catch {::tiff::getEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::getEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-19.$n "getEntry regular, [file tail $f]" {
	::tiff::getEntry $f {Artist Compression}
    } {Artist {} Compression 7}
    incr n
}

test tiff-20.0 "getEntry, fail, [file tail [info script]]" {







|







203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
    catch {::tiff::getEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::getEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-19.$n "getEntry regular, [file tail $f]" {
	::tiff::getEntry $f {Artist Compression}
    } {Artist {} Compression 7}
    incr n
}

test tiff-20.0 "getEntry, fail, [file tail [info script]]" {
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
    catch {::tiff::addEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::addEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-22.$n "addEntry, new tag, [file tail $f]" {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	removeFile ttmp
	set res
    } {{Artist {}} {Artist Andreas}}
    incr n
}

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-23.$n "addEntry, overwrite tag, [file tail $f]" knownBug {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 AK}}
	lappend res [tiff::getEntry $fx Artist]







|













|







234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
    catch {::tiff::addEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::addEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-22.$n "addEntry, new tag, [file tail $f]" {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	removeFile ttmp
	set res
    } {{Artist {}} {Artist Andreas}}
    incr n
}

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-23.$n "addEntry, overwrite tag, [file tail $f]" knownBug {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 AK}}
	lappend res [tiff::getEntry $fx Artist]
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
    catch {::tiff::deleteEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::deleteEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-26.$n "deleteEntry, [file tail $f]" {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::deleteEntry $fx Artist







|







289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
    catch {::tiff::deleteEntry foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::deleteEntry} {file entry ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-26.$n "deleteEntry, [file tail $f]" {
	file copy -force $f [set fx [makeFile {} ttmp]]
	set res {}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::addEntry $fx {{Artist 2 Andreas}}
	lappend res [tiff::getEntry $fx Artist]
	::tiff::deleteEntry $fx Artist
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
    catch {::tiff::getImage foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::getImage} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-29.$n "getImage, [file tail $f]" {tk unkownFormat} {
	set image [tiff::getImage $f]
	lappend res [image width  $image]
	lappend res [image height $image]
	image delete $image
	set res
    } {320 240}







|







323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
    catch {::tiff::getImage foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::getImage} {file ?image?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-29.$n "getImage, [file tail $f]" {tk unkownFormat} {
	set image [tiff::getImage $f]
	lappend res [image width  $image]
	lappend res [image height $image]
	image delete $image
	set res
    } {320 240}
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
    catch {::tiff::writeImage foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::writeImage} {image file ?entry?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-32.$n "writeImage, [file tail $f]" {tk unkownFormat} {
	set image [tiff::getImage $f]
	set fx [makeFile {} ttmp]
	tiff::writeImage $image $fx
	image delete $image
	foreach k [lsort [::tiff::entries $fx]] {
	    lappend res [tiff::getEntry $fx $k]







|







358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
    catch {::tiff::writeImage foo bar glop snarf} msg
    set msg
} [tcltest::tooManyArgs {::tiff::writeImage} {image file ?entry?}]

# -------------------------------------------------------------------------

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-32.$n "writeImage, [file tail $f]" {tk unkownFormat} {
	set image [tiff::getImage $f]
	set fx [makeFile {} ttmp]
	tiff::writeImage $image $fx
	image delete $image
	foreach k [lsort [::tiff::entries $fx]] {
	    lappend res [tiff::getEntry $fx $k]
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
} [tcltest::tooManyArgs {::tiff::debug} {file}]

# -------------------------------------------------------------------------
# We do not try to actually run 'debug', because it prints its results
# to stdout. This may change when we can capture stdout as test result

set n 0
foreach f [TestFilesGlob testimages/*.tiff] {
    test tiff-41.$n "debug ok, [file tail $f]" donotrun {
	::tiff::debug $f
    } {}
    incr n
}

test tiff-42.0 "debug, fail, [file tail [info script]]" {
    list [catch {::tiff::debug [info script]} msg] $msg
} {1 {not a tiff file}}

# -------------------------------------------------------------------------
testsuiteCleanup







|












535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
} [tcltest::tooManyArgs {::tiff::debug} {file}]

# -------------------------------------------------------------------------
# We do not try to actually run 'debug', because it prints its results
# to stdout. This may change when we can capture stdout as test result

set n 0
foreach f [TestFilesGlob test-assets/*.tiff] {
    test tiff-41.$n "debug ok, [file tail $f]" donotrun {
	::tiff::debug $f
    } {}
    incr n
}

test tiff-42.0 "debug, fail, [file tail [info script]]" {
    list [catch {::tiff::debug [info script]} msg] $msg
} {1 {not a tiff file}}

# -------------------------------------------------------------------------
testsuiteCleanup
modules/units/ChangeLog became a regular file.
modules/units/units.tcl became a regular file.
modules/units/units.test became a regular file.
modules/valtype/iban.tcl became a regular file.
modules/valtype/iban.test became a regular file.
modules/yaml/huddle.tcl became a regular file.
Changes to modules/yaml/huddle.test.
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#                }
#                set val [eval huddle list $subs]
#            }
#            lappend result $key $val
#        }
#        return [eval huddle create $result]
#    }
#    set fd [open [file join [file dirname [info script]] layers.txt] r]
#    set json1 [read $fd]
#    close $fd
#
#    set data [json::json2dict $json1]
##    set data [huddle_build $data]
##
##    set json2 [huddle jsondump $data]







|







140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#                }
#                set val [eval huddle list $subs]
#            }
#            lappend result $key $val
#        }
#        return [eval huddle create $result]
#    }
#    set fd [open [asset layers.txt] r]
#    set json1 [read $fd]
#    close $fd
#
#    set data [json::json2dict $json1]
##    set data [huddle_build $data]
##
##    set json2 [huddle jsondump $data]
Name change from modules/yaml/06eef112da.data to modules/yaml/test-assets/06eef112da.data.
Name change from modules/yaml/layers.txt to modules/yaml/test-assets/layers.txt.
modules/yaml/yaml.bench became a regular file.
Changes to modules/yaml/yaml.test.
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    }
    error
}

# ------------

test yaml-21.0.06eef112da {ticket 06eef112da} -body {
    yaml::yaml2dict -file [localPath 06eef112da.data]
} -result {{} {} {alpha 43 beta {houston {{}} newyork {{{} aaa}}}}}

# ------------
# error  .....

test yaml-1.1 "error" -body {
    set error1 {







|







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    }
    error
}

# ------------

test yaml-21.0.06eef112da {ticket 06eef112da} -body {
    yaml::yaml2dict -file [asset 06eef112da.data]
} -result {{} {} {alpha 43 beta {houston {{}} newyork {{{} aaa}}}}}

# ------------
# error  .....

test yaml-1.1 "error" -body {
    set error1 {