Joachim Nilsson
f1a1a21569
Add support for systemf(), formatted system() replacement
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-03-14 10:32:52 +01:00
Joachim Nilsson
7f3f4df9e9
Add support for fmkpath(), formatted string mkpath()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-03-11 20:03:03 +01:00
Joachim Nilsson
02a42a1cad
Add support for fopenf(), formatted string fopen()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-03-10 09:07:56 +01:00
Joachim Nilsson
59d1f0d60c
Update .gitignore files
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-02-22 13:57:39 +01:00
Joachim Nilsson
9d50de3ec7
tests: Add example of how to use printhdr()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2020-02-22 11:14:27 +01:00
Joachim Nilsson
13ffe87d10
tests: Update unit test for string functions
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-08-22 22:26:07 +02:00
Joachim Nilsson
b2c2d032e8
Add support for yorn(), safe yes-or-no prompt
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2019-05-29 15:57:11 +02:00
Joachim Nilsson
0ef509c393
Minor, reorder tests alphabetically
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-07-02 16:38:47 +02:00
Joachim Nilsson
5620faf7bf
Add unit test for strmatch()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-07-02 16:38:39 +02:00
Joachim Nilsson
f0e3ed3342
Add basic unit test for strlite.h
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2018-05-10 19:05:48 +02:00
Joachim Nilsson
123108fbf9
Fix #10 : Supply a default PATH for test
...
Set a default PATH matching the root user's defaults.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-07 23:09:19 +01:00
Joachim Nilsson
3545d63d2e
Fix #9 : Use /usr/bin/which, not /bin/which, for unit test.
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-12-07 22:15:40 +01:00
Joachim Nilsson
6608d2e8c9
Remove tree() from libite, moved to troglobit/toolbox.git instead
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 13:49:05 +01:00
Joachim Nilsson
3442d8e12b
Update unit test suite with new path to library and header files
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 09:03:54 +01:00
Joachim Nilsson
75f57283bd
Don't guess where conio.h is, rely on check.h instead
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-22 09:02:51 +01:00
Joachim Nilsson
abd6e3abd6
Update rsync() unit test slightly, does not verify MTIME yet ...
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-11-20 17:32:31 +01:00
Joachim Nilsson
ba3f7c89fb
Update makepath() unit test
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-10-31 21:08:21 +01:00
Joachim Nilsson
485463c70e
Update tree() test, use /usr/sbin instead of /sbin
...
Seems Debian finally went through with their move to symlink /bin and
/sbin to /usr/bin and /usr/sbin, respectively.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-09-30 11:13:23 +02:00
Joachim Nilsson
10e4a1d057
Update which() unit test, check for /bin/which and /bin/ps aux
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-07-03 12:45:33 +02:00
Joachim Nilsson
d018a5215f
which.c: C implementation of UNIX which(1)
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-07-02 16:50:58 +02:00
Joachim Nilsson
0d70c116d7
Update .gitignore files
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-07-02 16:33:00 +02:00
Joachim Nilsson
441d5f58d7
Add simple ocular unit test for printheader()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-06-30 20:28:31 +02:00
Joachim Nilsson
f89c3c88de
Clear build warnings for unit tests
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-06-30 17:43:11 +02:00
Joachim Nilsson
705b402344
Remove UNUSED() macro, just use -Wno-unused instead
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-06-30 17:36:10 +02:00
Joachim Nilsson
6ec2a31042
Update tempfile() unit test to detect failed write + read
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-06-18 18:14:39 +02:00
Joachim Nilsson
b7b635a3f4
Add unit test for touch to replicate issue #6
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-05-19 17:50:22 +02:00
Joachim Nilsson
dd53c3ae9e
Minor refactor of unit tests
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-05-19 17:50:07 +02:00
Joachim Nilsson
9ab70ebbcd
Build all unit tests static, for easier debugging
...
- Add -static to LDFLAGS
- Remove CFLAGS override, respect input from configure script
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-07 13:00:08 +01:00
Joachim Nilsson
bad363883d
Fix leaky makepath() unit test
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-07 12:59:27 +01:00
Joachim Nilsson
7f3215b3e6
Update pidfile unit test to cover new use-case
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-07 12:59:02 +01:00
Joachim Nilsson
b716776863
tests/pidfile: Cleanup test files from /tmp
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2017-01-07 06:53:21 +01:00
Joachim Nilsson
94d547c9ec
Unit test: fix search path for library header
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-05 00:19:52 +02:00
Joachim Nilsson
b6a55fcc46
Add err.h include to tests
...
lite.h no longer includes err.h it has to be included in each test.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-09-05 00:07:24 +02:00
Joachim Nilsson
7c2ed556b9
Replace \e GNUism w/ ISO \033 for escape sequences
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-08-22 01:31:49 +02:00
Joachim Nilsson
6dec4e3858
Extend lfile test with fstab parser
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-08-02 00:29:52 +02:00
Joachim Nilsson
23703c75da
tests/dir.c: Remove nested checker function
...
Move nested check function is_startup_config() outside main().
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 18:15:47 +02:00
Joachim Nilsson
682b662bd5
Add unit test for chomp()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 18:09:29 +02:00
Joachim Nilsson
75d4edb424
check.h: Add stdlib.h for exit()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 18:08:54 +02:00
Joachim Nilsson
141d4f6936
Add unit test for copyfile()/fcopyfile()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 17:59:52 +02:00
Joachim Nilsson
63aa6c5d07
Add unit test for dir()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 17:56:13 +02:00
Joachim Nilsson
92d81280a9
Add unit test for fexist()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 17:45:19 +02:00
Joachim Nilsson
267465f3d2
Add unit test for fisdir()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 17:42:31 +02:00
Joachim Nilsson
c22a6e64d9
Add unit test for progress bars
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 17:39:31 +02:00
Joachim Nilsson
6e558e98f0
Add unit test for rsync
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 17:28:41 +02:00
Joachim Nilsson
69291d3e74
Add unit test for fsendfile()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 17:20:58 +02:00
Joachim Nilsson
3c350b8862
Add unit test for LITE file API
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 17:11:22 +02:00
Joachim Nilsson
5b786ce221
Add unit test for tempfile()
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 17:07:14 +02:00
Joachim Nilsson
2d6e8850a2
Add unit test for tree
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 15:32:35 +02:00
Joachim Nilsson
d8cb477861
Ignore *.log and *.trs files in unit test dir
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 15:31:24 +02:00
Joachim Nilsson
27644677dd
Clean *.trs and *.log files from unit test dir
...
Signed-off-by: Joachim Nilsson <troglobit@gmail.com >
2016-06-06 15:31:24 +02:00