logo

utils-std

Collection of commonly available Unix tools
commit: 26cee270a8fe71ba30cd98df65b3dbbef9658caa
parent 893bff221e2192c46c32dd7fa899275724893ab3
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 11 May 2024 07:27:40 +0200

cmd/readlink.1: Add example to tests

Diffstat:

MMakefile4+++-
Mcmd/readlink.16+++---
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -18,11 +18,13 @@ all: $(EXE) $(MAN1SO) rm -f ${<:=.gcov} ${@:=.gcda} ${@:=.gcno} $(CC) -std=c99 $(CFLAGS) -c -o $@ $< +# Manpages with examples that cram/prysk can grok +MAN_EXAMPLES = cmd/readlink.1 TEST_LIBS = test-lib/mode test-lib/strtodur test-lib/symbolize_mode test-lib/truncation .PHONY: check check: all $(TEST_LIBS) check-man MALLOC_CHECK_=3 POSIX_ME_HARDER=1 POSIXLY_CORRECT=1 LC_ALL=C.UTF-8 LDSTATIC=$(LDSTATIC) kyua test || (kyua report --verbose --results-filter=broken,failed; false) - MALLOC_CHECK_=3 POSIX_ME_HARDER=1 POSIXLY_CORRECT=1 LC_ALL=C.UTF-8 $(CRAM) test-cmd/*.t + MALLOC_CHECK_=3 POSIX_ME_HARDER=1 POSIXLY_CORRECT=1 LC_ALL=C.UTF-8 $(CRAM) test-cmd/*.t ${MAN_EXAMPLES} .PHONY: check_status check_status: diff --git a/cmd/readlink.1 b/cmd/readlink.1 @@ -52,9 +52,9 @@ to .Pa foobar and read it: .Bd -literal -$ ln -s //example.org/ foobar -$ readlink foobar -//example.org/ + $ ln -s //example.org/ foobar + $ readlink foobar + //example.org/ .Ed .Sh SEE ALSO .Xr ln 1 ,