Re: [dev] Suckless unit testing in C?

From: Roberto E. Vargas Caballero <>
Date: Thu, 26 Feb 2015 08:45:17 +0100

> - ii: I don't see it using netcat

You can use netcat in the program or in the test. This is an example
where you can do the test of ii using simple shell scripts with
netcat. You don't need unit test or mockup.

> - quark: Doesn't use inetd

Because it was not designed by me. I propossed it and there were
people didn't want do it in this way. But again, you can
use netcat to test the program.

> - surf: depends on webkit for most stuff

Yes, and do you can use unit test to test if webkit is correct?
Surf is only a good wrapper about webkit, so if you mockup
webkit you are going to test only the part without problems.
The problems in surf is the interconexion with webkit (and
webkit itself). For example, I compiled surf the other day
in a system without any font (fc-list | wc -l == 0), and surf
generated ramdom cores, in a very nested function of
webkit. How can you test it with unit tests mocking

> - dwm: X11 API

You are moving to something different to the original topic,
network testing. When you have graphical programs you need
something different. I worked in a company that used xvkbd
and other program (I don't remember the name now) to read
the content of the window. You can use something like [1]


Received on Thu Feb 26 2015 - 08:45:17 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 26 2015 - 08:48:09 CET