34 lines
799 B
Plaintext
34 lines
799 B
Plaintext
#
|
|
# Copyright (C) 2021 CismonX <admin@cismon.net>
|
|
#
|
|
# Copying and distribution of this file, with or without modification, are
|
|
# permitted in any medium without royalty, provided the copyright notice and
|
|
# this notice are preserved. This file is offered as-is, without any warranty.
|
|
#
|
|
|
|
set tool ctlseqs
|
|
set timeout 2
|
|
|
|
set CSI_8BIT "\x9b"
|
|
|
|
tcsgrep_start
|
|
|
|
# Use Latin-1 charset, which supports 8-bit characters.
|
|
# Otherwise it will be converted into a 2-byte UTF-8 character.
|
|
fconfigure $spawn_id -encoding iso8859-1
|
|
|
|
send $CSI_8BIT
|
|
expect {
|
|
# ctlseqs does not recognize 8-bit control characters,
|
|
# but reading them should not break the program.
|
|
-ex "NOSEQ 1 \\x9b\n" {
|
|
pass "pass"
|
|
}
|
|
default {
|
|
puts $expect_out(buffer)
|
|
fail "fail"
|
|
}
|
|
}
|
|
|
|
tcsgrep_stop
|