Compare commits
6 Commits
0.14.4
...
a4e99bb208
| Author | SHA1 | Date | |
|---|---|---|---|
|
a4e99bb208
|
|||
|
5c184578c1
|
|||
|
d5b2a15bec
|
|||
|
b8424d47e2
|
|||
|
2a939273a8
|
|||
|
0e9127d417
|
7
Makefile
7
Makefile
@@ -62,7 +62,12 @@ dist: all docs
|
|||||||
install: dist
|
install: dist
|
||||||
cp -r $(DESTDIR)/* /
|
cp -r $(DESTDIR)/* /
|
||||||
|
|
||||||
include tests/tests.mk
|
TESTFILES != for file in tests/*.mk; do printf '%s ' "$$file"; done
|
||||||
|
|
||||||
|
TESTS != printf '%s\n' "$(TESTFILES)" | xargs -n1 basename \
|
||||||
|
| sed 's/\.mk/_tests/g'
|
||||||
|
|
||||||
|
include $(TESTFILES)
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: all $(TESTS) /tmp/getopt
|
test: all $(TESTS) /tmp/getopt
|
||||||
|
|||||||
@@ -4,7 +4,12 @@
|
|||||||
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
|
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
|
||||||
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
||||||
.\"
|
.\"
|
||||||
.TH DJ 1 2024-07-14 "Harakit X.X.X"
|
.TH DJ 1 2024-10-02 "Harakit X.X.X"
|
||||||
|
.SH PROLOGUE
|
||||||
|
\(lqSpin that track, catboy.\(rq
|
||||||
|
|
||||||
|
\(en DTB
|
||||||
|
.\"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
dj \(en disk jockey
|
dj \(en disk jockey
|
||||||
.\"
|
.\"
|
||||||
|
|||||||
12
docs/false.1
12
docs/false.1
@@ -4,7 +4,15 @@
|
|||||||
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
|
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
|
||||||
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
||||||
.\"
|
.\"
|
||||||
.TH FALSE 1 2024-06-06 "Harakit X.X.X"
|
.TH FALSE 1 2024-10-02 "Harakit X.X.X"
|
||||||
|
.SH PROLOGUE
|
||||||
|
\(lqA monk asked Joshu, a Chinese Zen master: \(oqHas a dog Buddha-nature or
|
||||||
|
not?\(cq
|
||||||
|
|
||||||
|
Joshu answered: \(oqMu.\(cq\(rq
|
||||||
|
|
||||||
|
\(en Mumon, The Gateless Gate, trans. Nyogen Senzaki & Paul Reps
|
||||||
|
.\"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
false \(en do nothing, unsuccessfully
|
false \(en do nothing, unsuccessfully
|
||||||
.\"
|
.\"
|
||||||
@@ -15,7 +23,7 @@ always be returned.
|
|||||||
.\"
|
.\"
|
||||||
.SH RATIONALE
|
.SH RATIONALE
|
||||||
|
|
||||||
In POSIX.1-2017,
|
In POSIX.1-2024,
|
||||||
.BR false (1p)
|
.BR false (1p)
|
||||||
exists for the construction of control flow and loops based on a failure. This
|
exists for the construction of control flow and loops based on a failure. This
|
||||||
implementation functions as described in that standard.
|
implementation functions as described in that standard.
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
||||||
.\"
|
.\"
|
||||||
.TH FOP 1 2024-06-17 "Harakit X.X.X"
|
.TH FOP 1 2024-06-17 "Harakit X.X.X"
|
||||||
|
.SH PROLOGUE
|
||||||
|
\(lqTwist it! Pull it! [Fop] it!\(rq
|
||||||
|
|
||||||
|
\(en \fIBop It\fP
|
||||||
.SH NAME
|
.SH NAME
|
||||||
fop \(en field operator
|
fop \(en field operator
|
||||||
.\"
|
.\"
|
||||||
|
|||||||
@@ -4,6 +4,13 @@
|
|||||||
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
||||||
.\"
|
.\"
|
||||||
.TH HRU 1 2024-06-17 "Harakit X.X.X"
|
.TH HRU 1 2024-06-17 "Harakit X.X.X"
|
||||||
|
.SH PROLOGUE
|
||||||
|
\(lq\(oqHuman rights.\(cq Even the name is racist. The Federation is basically a
|
||||||
|
\fIhomo sapiens\fP-only club...\(rq
|
||||||
|
|
||||||
|
\(en Azetbur, daughter of Chancellor Gorkon, \fIStar Trek VI: The Undiscovered
|
||||||
|
Country\fP
|
||||||
|
.\"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
hru \(en human readable units
|
hru \(en human readable units
|
||||||
.\"
|
.\"
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
|
||||||
.\"
|
.\"
|
||||||
.TH TRUE 1 2024-06-06 "Harakit X.X.X"
|
.TH TRUE 1 2024-06-06 "Harakit X.X.X"
|
||||||
|
.SH PROLOGUE
|
||||||
|
\(lqThe truth is one, there is no second about which a person who knows it would
|
||||||
|
argue with one who knows.\(rq
|
||||||
|
|
||||||
|
\(en The Buddha, Sutta Nip\[u0101]ta, trans. \[u1E6C]h\[u0101]nissaro Bhikkhu
|
||||||
.SH NAME
|
.SH NAME
|
||||||
true \(en do nothing, successfully
|
true \(en do nothing, successfully
|
||||||
.\"
|
.\"
|
||||||
@@ -15,7 +20,7 @@ always be returned.
|
|||||||
.\"
|
.\"
|
||||||
.SH RATIONALE
|
.SH RATIONALE
|
||||||
|
|
||||||
In \fIPOSIX.1-2017\fP,
|
In \fIPOSIX.1-2024\fP,
|
||||||
.BR true (1p)
|
.BR true (1p)
|
||||||
exists for the construction of control flow and loops based on a success. This
|
exists for the construction of control flow and loops based on a success. This
|
||||||
implementation functions as described in that standard.
|
implementation functions as described in that standard.
|
||||||
|
|||||||
31
tests/README
31
tests/README
@@ -1,24 +1,13 @@
|
|||||||
The testing suite contains two trees: the Bonsai tree and the POSIX tree:
|
Tests
|
||||||
|
=====
|
||||||
|
|
||||||
.
|
The Harakit testing suite verifies the functionality of Harakit utilities
|
||||||
├── README
|
and checks for regressions and other issues relating to compliance to our
|
||||||
├── bonsai/
|
standards of practice.
|
||||||
│ ├── dj.mk
|
|
||||||
│ ├── false.mk
|
|
||||||
│ ├── fop.mk
|
|
||||||
│ └── ...
|
|
||||||
├── posix/
|
|
||||||
└── tests.mk
|
|
||||||
|
|
||||||
The Bonsai tree tests the functionality of Harakit utilities for regressions and
|
Tests inherit the environment set by the top-level Makefile, which sets the BIN
|
||||||
other issues relating to compliance to our standards of practice.
|
variable to the build/bin directory at the root of the project; therefore, each
|
||||||
|
binary is located at $(BIN)/tool for idiomatic access.
|
||||||
The POSIX tests are currently a work-in-progress. Their status in this
|
|
||||||
repository is uncertain.
|
|
||||||
|
|
||||||
Both sets of tests also inherit the environment set by the top-level Makefile,
|
|
||||||
which sets the BIN variable to the build/bin directory at the root of the
|
|
||||||
project; therefore, each binary is located at $(BIN)/tool for idiomatic access.
|
|
||||||
|
|
||||||
Each test contains a set of PHONY targets which are prefixed with the name of
|
Each test contains a set of PHONY targets which are prefixed with the name of
|
||||||
the tool being tested and an underscore. The first target is tests, which
|
the tool being tested and an underscore. The first target is tests, which
|
||||||
@@ -27,10 +16,10 @@ included in the top Makefile, so they can be called from the root of the
|
|||||||
repository. This also means that BIN can be set manually so that tests can be
|
repository. This also means that BIN can be set manually so that tests can be
|
||||||
run using make(1) inside of the tests directory:
|
run using make(1) inside of the tests directory:
|
||||||
|
|
||||||
$ make -f tests.mk BIN=../build/bin dj_tests
|
$ make -f dj.mk BIN=../build/bin dj_tests
|
||||||
|
|
||||||
--
|
--
|
||||||
Copyright © 2024 Emma Tebibyte <emma@tebibyte.media>
|
Copyright © 2024–2025 Emma Tebibyte <emma@tebibyte.media>
|
||||||
|
|
||||||
This work is licensed under CC BY-SA 4.0. To view a copy of this license, visit
|
This work is licensed under CC BY-SA 4.0. To view a copy of this license, visit
|
||||||
<http://creativecommons.org/licenses/by-sa/4.0/>.
|
<http://creativecommons.org/licenses/by-sa/4.0/>.
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
|
|
||||||
# SPDX-License-Identifier: FSFAP
|
|
||||||
#
|
|
||||||
# Copying and distribution of this file, with or without modification, are
|
|
||||||
# permitted in any medium without royalty provided the copyright notice and this
|
|
||||||
# notice are preserved. This file is offered as-is, without any warranty.
|
|
||||||
|
|
||||||
# Strictly POSIX-compliant cat(1) implementation. See cat(1p)
|
|
||||||
|
|
||||||
for arg in "$@"; do
|
|
||||||
case "$arg" in
|
|
||||||
-u) args="$(printf '%s %s\n' "$args" "$arg")" ;;
|
|
||||||
*) args="$(printf -- '%s -i %s\n' "$args" "$arg")" ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# See IEEE Std 1003.1-2017 3.282
|
|
||||||
# https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_282
|
|
||||||
IFS=' '
|
|
||||||
|
|
||||||
mm $args
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (c) 2024 DTB <trinity@trinity.moe>
|
|
||||||
# Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
|
|
||||||
# SPDX-License-Identifier: FSFAP
|
|
||||||
#
|
|
||||||
# Copying and distribution of this file, with or without modification, are
|
|
||||||
# permitted in any medium without royalty provided the copyright notice and this
|
|
||||||
# notice are preserved. This file is offered as-is, without any warranty.
|
|
||||||
|
|
||||||
# Strictly POSIX-compliant false(1) implementation. See false(1p)
|
|
||||||
|
|
||||||
false "$@"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (c) 2024 DTB <trinity@trinity.moe>
|
|
||||||
# Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
|
|
||||||
# SPDX-License-Identifier: FSFAP
|
|
||||||
#
|
|
||||||
# Copying and distribution of this file, with or without modification, are
|
|
||||||
# permitted in any medium without royalty provided the copyright notice and this
|
|
||||||
# notice are preserved. This file is offered as-is, without any warranty.
|
|
||||||
|
|
||||||
# Strictly POSIX-compliant true(1) implementation. See true(1p)
|
|
||||||
true "$@"
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
PATH="$PWD/bin:$PATH"
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
# Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
|
|
||||||
# SPDX-License-Identifier: FSFAP
|
|
||||||
#
|
|
||||||
# Copying and distribution of this file, with or without modification, are
|
|
||||||
# permitted in any medium without royalty provided the copyright notice and this
|
|
||||||
# notice are preserved. This file is offered as-is, without any warranty.
|
|
||||||
|
|
||||||
|
|
||||||
#TESTFILES != for file in tests/bonsai/*.mk tests/posix/*.mk; do printf '%s ' "$$file"; done;
|
|
||||||
TESTFILES != for file in tests/bonsai/*.mk; do printf '%s ' "$$file"; done;
|
|
||||||
|
|
||||||
TESTS != printf '%s\n' "$(TESTFILES)" | xargs -n1 basename \
|
|
||||||
| sed 's/\.mk/_tests/g'
|
|
||||||
|
|
||||||
include $(TESTFILES)
|
|
||||||
Reference in New Issue
Block a user