IDL ships with both a GUI (IDL Workbench) and Command Line interface. Command Line IDL can be launched from terminal on any platform and will bring up an IDL interpreter.
For automated tests, you can launch IDL through a shell script like bash, or you can use the IDL Batch Job functionality: https://www.l3harrisgeospatial.com/docs/batchjobs.html
Finally, you can also call IDL from command line with the "-e" (execute) flag to run single-line IDL commands. Each line could be an entire procedure or function in your unit test: https://www.l3harrisgeospatial.com/docs/command_line_options_for.html