SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

34
devel/shunit2/Makefile Normal file
View file

@ -0,0 +1,34 @@
COMMENT = unit test framework for Bourne based shell scripts
DISTNAME = shunit2-2.1.6
REVISION = 1
CATEGORIES = devel
HOMEPAGE = https://github.com/kward/shunit2
# LGPLv2.1
PERMIT_PACKAGE = Yes
MASTER_SITES = https://distfiles.sigtrap.nl/
EXTRACT_SUFX = .tgz
NO_BUILD = Yes
SHUNIT2_DIR = ${PREFIX}/share/shunit2
post-patch:
perl -pi -e "s#^. ../src/shunit2#. ${PREFIX}/bin/shunit2#" \
${WRKSRC}/examples/*.sh
do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/{doc,examples}/shunit2
${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/shunit2
${INSTALL_DATA} ${WRKSRC}/examples/* ${PREFIX}/share/examples/shunit2
${INSTALL_SCRIPT} ${WRKSRC}/src/shunit2 ${PREFIX}/bin
do-test:
cd ${WRKSRC}/src && sh ./shunit2_test.sh
.include <bsd.port.mk>

2
devel/shunit2/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (shunit2-2.1.6.tgz) = ZaMTp2/VzBxYyeGfvID8DkGKTL+9RtVLNe1bbgAl1O4=
SIZE (shunit2-2.1.6.tgz) = 61558

View file

@ -0,0 +1,21 @@
--- src/shunit2_test_misc.sh.orig Sat Dec 27 22:07:52 2014
+++ src/shunit2_test_misc.sh Sat Dec 27 22:09:17 2014
@@ -35,12 +35,18 @@ testUnboundVariable()
EOF
( exec ${SHUNIT_SHELL:-sh} "${unittestF}" >"${stdoutF}" 2>"${stderrF}" )
assertFalse 'expected a non-zero exit value' $?
+# OpenBSD sh and ksh do not implement handling of ERR or EXIT traps in functions
+case $SHUNIT_SHELL in
+/bin/sh|/bin/ksh) ;;
+*)
grep '^ASSERT:Unknown failure' "${stdoutF}" >/dev/null
assertTrue 'assert message was not generated' $?
grep '^Ran [0-9]* test' "${stdoutF}" >/dev/null
assertTrue 'test count message was not generated' $?
grep '^FAILED' "${stdoutF}" >/dev/null
assertTrue 'failure message was not generated' $?
+ ;;
+esac
}
testIssue7()

View file

@ -0,0 +1,20 @@
--- src/shunit2_test.sh.orig Sat Dec 27 22:09:42 2014
+++ src/shunit2_test.sh Sat Dec 27 22:11:45 2014
@@ -15,7 +15,7 @@ MY_NAME=`basename $0`
MY_PATH=`dirname $0`
PREFIX='shunit2_test_'
-SHELLS='/bin/sh /bin/bash /bin/dash /bin/ksh /bin/pdksh /bin/zsh'
+SHELLS='/bin/sh /bin/ksh'
TESTS=''
for test in ${PREFIX}[a-z]*.sh; do
TESTS="${TESTS} ${test}"
@@ -107,7 +107,7 @@ for shell in ${shells}; do
#
EOF
- SHUNIT_SHELL=${shell} # pass shell onto tests
+ export SHUNIT_SHELL=${shell} # pass shell onto tests
shell_name=`basename ${shell}`
shell_version=`versions_shellVersion "${shell}"`

4
devel/shunit2/pkg/DESCR Normal file
View file

@ -0,0 +1,4 @@
shUnit2 is a xUnit unit test framework for Bourne based shell scripts,
and it is designed to work in a similar manner to JUnit, PyUnit, etc.
If you have ever had the desire to write a unit test for a shell script,
shUnit2 can do the job.

27
devel/shunit2/pkg/PLIST Normal file
View file

@ -0,0 +1,27 @@
bin/shunit2
share/doc/shunit2/
share/doc/shunit2/CHANGES-2.1.txt
share/doc/shunit2/LGPL-2.1
share/doc/shunit2/README.html
share/doc/shunit2/README.txt
share/doc/shunit2/RELEASE_NOTES-2.1.0.txt
share/doc/shunit2/RELEASE_NOTES-2.1.1.txt
share/doc/shunit2/RELEASE_NOTES-2.1.2.txt
share/doc/shunit2/RELEASE_NOTES-2.1.3.txt
share/doc/shunit2/RELEASE_NOTES-2.1.4.txt
share/doc/shunit2/RELEASE_NOTES-2.1.5.txt
share/doc/shunit2/RELEASE_NOTES-2.1.6.txt
share/doc/shunit2/TODO.txt
share/doc/shunit2/coding_standards.txt
share/doc/shunit2/contributors.txt
share/doc/shunit2/design_doc.txt
share/doc/shunit2/rst2html.css
share/doc/shunit2/shunit2.html
share/doc/shunit2/shunit2.txt
share/examples/shunit2/
share/examples/shunit2/equality_test.sh
share/examples/shunit2/lineno_test.sh
share/examples/shunit2/math.inc
share/examples/shunit2/math_test.sh
share/examples/shunit2/mkdir_test.sh
share/examples/shunit2/party_test.sh