---
name: "irtestcase"
section: "1"
platform: "linux"
package: "lirc"
version: "1:0.10.2-6"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/irtestcase"
---

# irtestcase(1)

Create or check decoding testcases.

## NAME

**irtestcas**e - Create or check decoding testcases.

## SYNOPSIS

**irtestcase** \[*-l lircrc-file -p prog*\] \<*socket*\>

**irtestcase** \[*-l lircrc-file -p prog*\] -t *testdata* \<*socket*\>

**irtestcase** \[*-v*\|*-h*\]

## DESCRIPTION

**irtestcase** is a tool which can record keypresses from a remote together with the decoded values. Given output from another session, it can also verify that the decoding still works as expected.

In the first form irtestcase will wait for input and create log files for it. Doing so, it also echoes received buttons on stdout. There is no way to stop the program in a clean way, just use ctrl-C when completed.

In the second form it will feed the data from the testdata file to lircd and log the the decoded data as usually. Thus, this makes it possible to test the output from the remote which generated the testdata.  In this form lircd must be running with the "file" driver.

The optional socket is the lircd output socket (lircd must be running). It defaults to LIRC\_SOCKET\_PATH in environment, falling back to a hardcoded default value (/var/run/lirc/lircd).

## OPTIONS

- **-l, --lircrc** *\<lircrc config file\>*

  Log also applications strings (as [ircat(1)](/ircat/1.md)) using lircrc type config file.

- **-p, --prog** *\<program id\>*

  When using -l/--lircrc, the program name matching the PROG = entries in lircrc

- **-t, --testdata**

  Use data i file instead of "live" input from the remote. This can be the durations.log file from a previous run, see FILES. It can also be logged output from [mode2(1)](/mode2/1.md).

- **-v , --version**

  Print version and exit.

- **-h , --help**

  Print help message.

## ENVIRONMENT

irtestcase respects LIRC\_SOCKET\_PATH which if defined holds the path to the lircd output socket to listen to.

## FILES

- **/tmp/irtestcase**

  irtestcase creates files in /tmp/irtestcase (hardcoded, sorry). After a successful run here is:

  - **durations.log**

    Printable space/pulse durations in the same format as [mode2(1)](/mode2/1.md). This file is usable as -t/--testdata input.

  - **codes.log**

    The decoded  buttons, in same format as [irw(1)](/irw/1.md).

  - **app\_strings.log**

    The application strings, as presented by [ircat(1)](/ircat/1.md).

- **~/.cache/irtestcase.log**

  Debug log. Setting the XDG\_CACHE\_HOME environment variable relocates this file to $XDG\_CACHE\_HOME/irtestcase.log. The amount of logging respects the LIRC\_LOGLEVEL environment variable, defaulting to the *debug* value in the *\[lircd\]* section of lirc\_options.conf.

## SEE ALSO

The documentation for **lirc** is maintained as html pages. They are located under html/ in the documentation directory.
