Remove the remaining files of the DejaGnu tests

The tests were disabled in commit cb1732fc2a.
pull/1860/head
Daniele Forsi IU5HKX 2025-08-17 12:08:23 +02:00 zatwierdzone przez Nate Bargmann
rodzic 6e3b8b223d
commit 73a967e569
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: FB2C5130D55A8819
5 zmienionych plików z 0 dodań i 287 usunięć

Wyświetl plik

@ -1,86 +0,0 @@
# Copyright (C) 1997 - 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Please email any bugs, comments, and/or additions to this file to:
# hamlib-developer@lists.sourceforge.net
set RIGCTL "../rigctl"
set verbose 0
if ![info exists prompt] then {
set prompt "Rig command: "
}
#
# rigctl_version -- extract and print the version number of rigctl
#
proc rigctl_version {} {
global RIGCTL
global prompt
set tmp [exec $RIGCTL --version]
regexp "Hamlib version *(\[^\n\]*)\n.*" $tmp tmp version
clone_output "[which $RIGCTL] version $version\n"
}
#
# rigctl_load -- loads the program
#
proc rigctl_load { arg } {
#
}
#
# rigctl_exit -- quit and cleanup
#
proc rigctl_exit {} {
send "quit\n"
}
#
# rigctl_start -- start rigctl running
#
proc rigctl_start {} {
global RIGCTL
global prompt
global spawn_id
global verbose
if { $verbose > 1 } {
send_user "starting $RIGCTL\n"
}
spawn $RIGCTL
expect {
-re "No such file.*" { perror "Can't start $RIGCTL"; exit 1 }
-re "$prompt$" { }
#FIXME
#-re "rig: dlsym\(initrigs_([^\)]*)\) failed.*" { perror "Can't find backend $expect_out(1,string)"; exit 1 }
timeout { perror "Failed to spawn $RIGCTL (timeout)"; exit 1 }
}
}
rigctl_start
send "v\n"
expect { -re ""}
expect { -re "v*"}
expect { -re "VFO:*"}
expect { -re "Rig Command:"}
#send "f\n"
#expect { -re "Frequency:*"}
#interact
#send "m\n"
#expect { -re "Mode:*"}
#send "t\n"
#expect { -re "PTT:*"}
rigctl_exit

Wyświetl plik

@ -1,61 +0,0 @@
# Copyright (C) 1997 - 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Please email any bugs, comments, and/or additions to this file to:
# hamlib-developer@lists.sourceforge.net
set timeout 3
#
# expectations that clean up in case of error. Note that '$test' is
# a purely local variable.
#
# The first of these is used to match any bad responses, and resynchronise
# things by finding a prompt. The second is a timeout error, and shouldn't
# ever be triggered.
#
expect_after {
-re "\[^\n\r\]*$prompt$" {
fail "$test (bad match)"
if { $verbose > 0 } {
regexp ".*\r\n(\[^\r\n\]+)(\[\r\n\])+$prompt$" \
$expect_out(buffer) "" output
send_user "\tUnmatched output: \"$output\"\n"
}
}
timeout {
fail "$test (timeout)"
}
}
#
# Here are the tests
#
set test "help"
send "?\n"
expect {
-re "Commands \\(may not be available for this rig\\):.*$prompt$" { pass "$test" }
}
set test "nocmd"
send "\n"
expect {
-re "\\? for help, q to quit\\..*$prompt$" { pass "$test" }
}
set test "info"
send "\\get_info\n"
expect {
-re "Info:.*$prompt$" { pass "$test" }
}

Wyświetl plik

@ -1,51 +0,0 @@
# Copyright (C) 1997 - 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Please email any bugs, comments, and/or additions to this file to:
# hamlib-developer@lists.sourceforge.net
set TESTBCD "$srcdir/testbcd"
#
# Here are the tests
#
# BCD: 44,34,33,22,12
# BCD: 12,22,33,34,44
proc test_bcd { test freq digits bcdle bcdbe } {
global TESTBCD
set tmp [exec $TESTBCD $freq $digits]
set pat ".*Little Endian mode\nFrequency: $freq\nBCD: $bcdle\nResult after recoding: $freq\n\nBig Endian mode\nFrequency: $freq\nBCD: $bcdbe\nResult after recoding: $freq$"
if [regexp $pat $tmp] {
pass "$test"
} else {
clone_output "Expected le: $bcdle, be: $bcdbe, got:\n$tmp"
fail "$test"
}
}
test_bcd "10/10 digits" 1222333444 10 "44,34,33,22,12" "12,22,33,34,44"
test_bcd "9/10 digits" 999666333 10 "33,63,66,99,09" "09,99,66,63,33"
test_bcd "8/10 digits" 87666333 10 "33,63,66,87,00" "00,87,66,63,33"
test_bcd "1/10 digit" 1 10 "01,00,00,00,00" "00,00,00,00,01"
# note the 10th digit which is undefined
test_bcd "9/9 digits" 999666333 9 "33,63,66,99,.9" "99,96,66,33,3."
test_bcd "8/9 digits" 87666333 9 "33,63,66,87,.0" "08,76,66,33,3."
test_bcd "1/9 digit" 1 9 "01,00,00,00,.0" "00,00,00,00,1."

Wyświetl plik

@ -1,42 +0,0 @@
# Copyright (C) 1997 - 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Please email any bugs, comments, and/or additions to this file to:
# hamlib-developer@lists.sourceforge.net
set TESTFREQ "$srcdir/testfreq"
#
# Here are the tests
#
proc test_freq { test } {
global TESTFREQ
set tmp [exec $TESTFREQ]
set pat ".*GHz.2. = 2000000000\nGHz.4. = 4000000000\nGHz.5. = 5000000000\nGHz.1.3. = 1300000000\nGHz.1.234567890. = 1234567890\nGHz.123.456789012. = 123456789012$"
if [regexp $pat $tmp] {
pass "$test"
} else {
clone_output "Expected GHz holding on >32bits, got:\n$tmp"
fail "$test"
puts $pat
}
}
test_freq ">32bit freq's"

Wyświetl plik

@ -1,47 +0,0 @@
# Copyright (C) 1997 - 2001 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Please email any bugs, comments, and/or additions to this file to:
# hamlib-developer@lists.sourceforge.net
set TESTLOC "$srcdir/testloc"
#
# Here are the tests
#
# TODO: upcase locator
proc test_loc1 { test loc } {
global TESTLOC
set tmp [exec $TESTLOC $loc]
set pat "Locator1: $loc\n.*Recoded: $loc$"
if [regexp $pat $tmp] {
pass "$test"
} else {
clone_output "Expected locator: $loc, got:\n$tmp"
fail "$test"
}
}
test_loc1 "Simple recorded loc" IN98EC
test_loc1 "Simple recorded loc" EM19OV
test_loc1 "Simple recorded loc" DM33DX
test_loc1 "Simple recorded loc" IO93LA
test_loc1 "Simple recorded loc" IO93MA
test_loc1 "Simple recorded loc" IO93NA