c86b336769
File locations are prefixed with `$::srcdir' so that `make distcheck' can execute the test suite using a relative path. The current working directory is removed from the test-suite-bash-prompt. Furthermore, no more dynamic creation of files in dir $::srcdir/fixtures since this dir is read-only during `make distcheck'. Instead create dynamic files in $TESTDIR/tmp The test suite uses these "directory" variables tcl bash description ------------ ----------- ------------------------------------ $::srcdir $SRCDIR where `fixtures' reside, relative $::srcdirabs $SRCDIRABS where `fixtures' reside, absolute $::TESTDIR $TESTDIR where `runtest' is invoked, absolute
32 lines
658 B
Plaintext
32 lines
658 B
Plaintext
proc setup {} {
|
|
save_env
|
|
}
|
|
|
|
|
|
proc teardown {} {
|
|
assert_env_unmodified
|
|
}
|
|
|
|
|
|
setup
|
|
|
|
|
|
# Adding a print job is successful?
|
|
if {[assert_exec {lp -H hold $::srcdir/fixtures/shared/default/foo} job "" "untested"]} {
|
|
# Yes, adding a print-job is successful;
|
|
# Retrieve job-id, so we can cancel the job after the test
|
|
set job_id [lindex [split $job] 3]
|
|
# Retrieve list of all current print jobs
|
|
assert_exec {lpstat | cut -d\040 -f1} jobs
|
|
# Completion should show all print jobs
|
|
assert_complete $jobs "cancel "
|
|
# Remove/cancel the test print job
|
|
assert_exec "cancel $job_id"
|
|
}
|
|
|
|
|
|
sync_after_int
|
|
|
|
|
|
teardown
|