hamlib/tests
David Christle 113fbcdf3b
fix(core): terminate empty hexadecimal output
to_hex() left non-empty destination buffers untouched when the source
length was zero. Initialize the output string before returning and cover
the empty conversion in testbcd.

(cherry picked from commit 439f91fa28)
2026-08-01 06:56:10 -05:00
..
.gitignore Add conditionally generated file to .gitignore and CLEANFILES 2025-08-21 09:03:59 +02:00
ampctl.c Make static all usage() and usage_short() functions 2025-09-21 22:20:29 +02:00
ampctl_parse.c Fix errors found by glibc 2.43 2026-05-06 12:40:57 -05:00
ampctl_parse.h Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
ampctld.c The ampctld and rotctld do not read COMMANDs from their command line 2025-09-21 22:20:29 +02:00
amptest.sh Read the frequency just set and fix typos 2025-08-18 07:47:14 -05:00
cachetest.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
cachetest.sh Restyle tests/cachetest.sh for 4 space tabs 2020-05-31 12:52:17 -05:00
cachetest2.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
dumpcaps.c Remove duplicated rig_type[] lines 2025-08-24 20:18:30 +02:00
dumpcaps.h Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
dumpcaps_amp.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
dumpcaps_rot.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
dumpcaps_rot.h Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
dumpmem.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
dumpstate.c Remove duplicated rig_type[] lines 2025-08-24 20:18:30 +02:00
example.c Document fixing MinGW warnings and linker error 2025-08-18 17:24:08 -05:00
func_chk.c astyle files in preparation for release 4.6 2024-11-06 08:07:34 -06:00
hamlib_tuner_control Update info in hamlib_tuner_control 2022-12-19 14:38:58 -06:00
hamlibmodels.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
listrigs.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
Makefile.am fix(debug): prevent race in debug history capture 2026-07-25 00:43:52 -05:00
memcsv.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
memload.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
memsave.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
README Once more into the breech... 2025-09-17 21:08:30 -04:00
rig_bench.c Fix typos 2025-08-16 11:52:55 +02:00
rig_split_lst.awk Remove remaining references to rpc 2013-09-19 15:24:52 -05:00
rig_tests.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
rig_tests.h Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
rigctl.c Infrastructure and setup for associating connection data with thread 2026-06-12 09:04:27 -05:00
rigctl_parse.c Make a padded copy of input so compare doesn't overread 2026-06-12 09:05:06 -05:00
rigctl_parse.h Make a padded copy of input so compare doesn't overread 2026-06-12 09:05:06 -05:00
rigctlcom.c Make static all usage() and usage_short() functions 2025-09-21 22:20:29 +02:00
rigctld.c Make a padded copy of input so compare doesn't overread 2026-06-12 09:05:06 -05:00
rigctlsync.c Make static all usage() and usage_short() functions 2025-09-21 22:20:29 +02:00
rigctltcp.c Move password status to connection specific data. 2026-06-12 09:04:38 -05:00
rigfreqwalk.c Fix typos 2025-08-16 11:52:55 +02:00
rigmatrix.c Fix compiler errors 2025-08-19 10:36:25 +02:00
rigmatrix_head.html initial release 2001-06-05 18:10:26 +00:00
rigmem.c Make static all usage() and usage_short() functions 2025-09-21 22:20:29 +02:00
rigsmtr.c Make static all usage() and usage_short() functions 2025-09-21 22:20:29 +02:00
rigswr.c Make static all usage() and usage_short() functions 2025-09-21 22:20:29 +02:00
rigtestlibusb.c Use pkgconf/pkg-config to test for libusb-1.0 2025-09-17 21:31:37 -05:00
rigtestmcast.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
rigtestmcastrx.c Fix include config.h 2025-08-30 11:18:51 +02:00
rotctl.c Make static all usage() and usage_short() functions 2025-09-21 22:20:29 +02:00
rotctl_parse.c Fix errors found by glibc 2.43 2026-05-06 12:40:57 -05:00
rotctl_parse.h Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
rotctld.c The ampctld and rotctld do not read COMMANDs from their command line 2025-09-21 22:20:29 +02:00
sendraw.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
simple.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
test2038.c A few more cppcheck messages silenced 2025-07-28 19:31:20 -04:00
testbcd.c fix(core): terminate empty hexadecimal output 2026-08-01 06:56:10 -05:00
testcache.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
testcaps.sh Fix clang warning on callback functions 2022-11-14 16:37:20 -06:00
testcookie.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
testctld.pl Fix spelling errors 2020-07-24 09:02:48 +02:00
testdebug.c fix(debug): prevent race in debug history capture 2026-07-25 00:43:52 -05:00
testfreq.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
testgrid.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
testloc.c Fix typos 2025-08-03 10:49:23 +02:00
testmW2power.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
testnet.c Fix include config.h 2025-08-30 11:18:51 +02:00
testrig.c Fix typos 2025-08-16 11:52:55 +02:00
testrigcaps.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
testrigopen.c Fix ambiguity between system includes and Hamlib includes 2025-07-22 23:33:57 +02:00
testrotctld.pl Fix spelling errors 2020-07-24 09:02:48 +02:00
testsecurity.c Document fixing MinGW warnings and linker error 2025-08-18 17:24:08 -05:00
uthash.h Replace uthash.h(1.9.4) with latest release(2.3.0) 2025-08-13 13:21:40 -04:00

You will find in the tests/ subdirectory various programs to exercise
the Hamlib library.

Most of the time, you will have to make sure that the backend for
your rig is loaded by passing the model number of your rig by argument.
If you don't know the number, listrigs can give it to you,
"rigctl --list" will also output something like this:

    Rig#    Mfg           Model           Vers.
    1       Hamlib        Dummy           0.1
    105     Yaesu         FT-747GX        0.1
    210     Kenwood       TS-870S         0.1
    311     Icom          IC-706MkIIG     0.2
    1506    Winradio      WR-3500         0.6
    [etc.]

In any case, you are encouraged to check for correct initialization
by reading the source code, at the beginning of the main().  Check also
that the program is setup for your rig path strncpy(HAMLIB_RIGPORT(my_rig)->pathname...

dumpcaps  - Output the caps contents of a rig
dumpmem   - Dump the memory contents of the rig
listrigs  - Condensed list of all the models supported by backends
rigmatrix - Output the HTML table of supported rigs, with .png files for freqs
            (Better call 'make rigmatrix.html' which builds the HTML table
            and additional information in sup-info subdirectory.)
testbcd   - Simple program to test BCD conversion, takes a number as arg.
testfreq  - Simple program to test Freq conversion, takes a number as arg.
testrig   - Sample program calling common API calls, uses rig_probe
rigctl    - Combined tool to execute any call of the API, see man page
rigmem    - Combined tool to load/save content of rig memory, see man page
rotctl    - Similar to 'rigctl' but for rotators, see man page
rigctld   - A simple daemon to process 'rigctl' commands received over a
            network socket.  Useful for scripting languages or remote access
            via an SSH tunnel (insecure program).  See man page.
rotctld   - A simple daemon to process 'rotctl' commands received over a
            network socket.  Useful for scripting languages or remote access
            via an SSH tunnel (insecure program).  See man page.
testctld.pl A Perl program to test 'rigctld' and provide some example code.