Diff

Differences From Artifact [5be9e46f9a]:

To Artifact [44a6e7f4d1]:


18
19
20
21
22
23
24


















25
26
27
28
29
30
31
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
43
44
45
46
47
48
49







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+








	if {[llength $rv] != [llength $verify]} {
		error "VERIFY FAILED: glob ... $args ($rv versus $verify)"
	}

	return $rv
}

proc test_summary {} {
	set format "| %7s | %7s | %7s | %7s |"
	set emptyRow [format $format "" "" "" ""]
	set emptyRowLength [string length $emptyRow]
	lappend output "/[string repeat - [expr {$emptyRowLength - 2}]]\\"
	lappend output [format $format "Passed" "Failed" "Skipped" "Total"]
	lappend output [regsub -all -- " " [regsub -all -- " \\| " $emptyRow " + "] "-"]
	lappend output [format $format \
		$::tcltest::numTests(Passed) \
		$::tcltest::numTests(Failed) \
		$::tcltest::numTests(Skipped) \
		$::tcltest::numTests(Total) \
	]
	lappend output "\\[string repeat - [expr {$emptyRowLength - 2}]]/"

	return [join $output "\n"]
}

tcltest::customMatch boolean [list apply {{expected actual} {
	if {!!$expected == !!$actual} {
		return true
	} else {
		return false
	}
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
322
323
324
313
314
315
316
317
318
319











320
321
322
323
324
325
326
327
328
329
330
331
332
333







-
-
-
-
-
-
-
-
-
-
-
+






+






} -cleanup {
	set auto_path $startAutoPath
	unset startAutoPath
} -constraints knownBug -result ""

# Output results
if {$::tcltest::numTests(Failed) != 0} {
	set format "| %20s | %20s | %20s | %20s |"
	puts [string repeat - [string length [format $format - - - -]]]
	puts [format $format "Passed" "Failed" "Skipped" "Total"]
	puts [format $format \
		$::tcltest::numTests(Passed) \
		$::tcltest::numTests(Failed) \
		$::tcltest::numTests(Skipped) \
		$::tcltest::numTests(Total) \
	]
	puts [string repeat - [string length [format $format - - - -]]]

	puts [test_summary]
	if {[info exists ::env(XVFS_TEST_EXIT_ON_FAILURE)]} {
		exit $::env(XVFS_TEST_EXIT_ON_FAILURE)
	}
	exit 1
}

puts [test_summary]
puts "ALL TESTS PASSED"

if {[info exists ::env(XVFS_TEST_EXIT_ON_SUCCESS)]} {
	exit $::env(XVFS_TEST_EXIT_ON_SUCCESS)
}
exit 0