Skip to content

Commit

Permalink
2022.3.17 update
Browse files Browse the repository at this point in the history
  • Loading branch information
HubTou committed Mar 17, 2022
1 parent 625b39b commit 75bf0c4
Show file tree
Hide file tree
Showing 5 changed files with 298 additions and 1 deletion.
13 changes: 12 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = PNU
description = The PNU Project
long_description = file: README.md
long_description_content_type = text/markdown
version = 2021.8.25
version = 2022.3.17
license = BSD 3-Clause License
license_files = License
author = Hubert Tournier
Expand Down Expand Up @@ -31,6 +31,7 @@ classifiers =
Programming Language :: Python :: 3.10
Topic :: Education
Topic :: Education :: Testing
Topic :: Software Development :: Libraries
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: Testing
Topic :: System
Expand All @@ -47,15 +48,21 @@ install_requires =
pnu-anagram
pnu-b2bt
pnu-basename
pnu-conjuguer
pnu-dcmp
pnu-echobox
pnu-fortune
pnu-ident
pnu-manpath
pnu-mtoc
pnu-ngc
pnu-prep
pnu-rot13
pnu-strfile
pnu-strings
pnu-true
pnu-unicode2ascii
pnu-what

[options.data_files]
share/PNU =
Expand All @@ -64,8 +71,12 @@ share/PNU =
tests/echo.xml
tests/factor.xml
tests/false.xml
tests/ident.xml
tests/manpath.xml
tests/prep.xml
tests/primes.xml
tests/rot13.xml
tests/true.xml
tests/what.xml
tests/yes.xml

85 changes: 85 additions & 0 deletions tests/ident.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0"?>
<test-suite program="ident" processor="b2bt 1.1" ID="@(#) $Id: ident.xml - back to back test suite for ident v1.0.0 (October 31, 2021) by Hubert Tournier $">

<test-case name="Usual call with match">
<cmd>
ident /usr/bin/unifdef
</cmd>
</test-case>

<test-case name="Usual call with no match">
<cmd>
ident /bin/tcsh
</cmd>
</test-case>

<test-case name="Multiple arguments">
<cmd>
ident /usr/bin/unifdef /usr/bin/file
</cmd>
</test-case>

<test-case name="No arguments" timeout="0.5">
<cmd>
ident
</cmd>
</test-case>

<test-case name="Standard input support with match">
<cmd>
cat /usr/bin/unifdef | ident
</cmd>
</test-case>

<test-case name="Standard input support with no match">
<cmd>
cat /bin/tcsh | ident
</cmd>
</test-case>

<test-case name="Option -q">
<cmd>
ident -q /bin/tcsh
</cmd>
</test-case>

<test-case name="Option -V on GNU/Linux">
<cmd>
IDENT_FLAVOUR=gnu:linux ident -V
</cmd>
</test-case>

<test-case name="Option -V on FreeBSD">
<cmd>
IDENT_FLAVOUR=bsd:freebsd ident -V
</cmd>
</test-case>

<test-case name="Options terminator handling">
<cmd>
ident -- /usr/bin/unifdef
</cmd>
</test-case>

<test-case name="Illegal option">
<cmd>
ident -i
</cmd>
</test-case>

<test-case name="Non existent file">
<cmd>
ident nonexistent
</cmd>
</test-case>

<test-case name="Empty file">
<pre>
touch empty_file
</pre>
<cmd>
ident empty_file
</cmd>
</test-case>

</test-suite>
88 changes: 88 additions & 0 deletions tests/manpath.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0"?>
<test-suite program="manpath" processor="b2bt 1.1" ID="@(#) $Id: manpath.xml - back to back test suite for manpath v1.0.0 (March 6, 2022) by Hubert Tournier $">

<test-case name="Usual call #1">
<cmd>
unset MANPATH ; manpath
</cmd>
</test-case>

<test-case name="Usual call #1 with extra debugging level 1">
<cmd>
unset MANPATH ; manpath -d
</cmd>
</test-case>

<test-case name="Usual call #1 with extra debugging level 2">
<cmd>
unset MANPATH ; manpath -dd
</cmd>
</test-case>

<test-case name="Usual call #1 with extra debugging level 3">
<cmd>
unset MANPATH ; manpath -ddd
</cmd>
</test-case>

<test-case name="PATH unset">
<cmd>
unset PATH ; unset MANPATH ; manpath -dd
</cmd>
</test-case>

<test-case name="MANPATH set">
<cmd>
MANPATH=/usr/share/man manpath -d
</cmd>
</test-case>

<test-case name="MANPATH set and quiet mode">
<cmd>
MANPATH=/usr/share/man manpath -qd
</cmd>
</test-case>

<test-case name="Usual call #2">
<cmd>
unset MANLOCALES ; manpath -L
</cmd>
</test-case>

<test-case name="Usual call #2 with extra debugging level 1">
<cmd>
unset MANLOCALES ; manpath -Ld
</cmd>
</test-case>

<test-case name="Usual call #2 with extra debugging level 2">
<cmd>
unset MANLOCALES ; manpath -Ldd
</cmd>
</test-case>

<test-case name="Usual call #2 with extra debugging level 3">
<cmd>
unset MANLOCALES ; manpath -Lddd
</cmd>
</test-case>

<test-case name="MANLOCALES set">
<cmd>
MANLOCALES=fr_FR.UTF-8 manpath -Ld
</cmd>
</test-case>

<test-case name="MANLOCALES set and quiet mode">
<cmd>
MANLOCALES=fr_FR.UTF-8 manpath -Lqd
</cmd>
</test-case>

<test-case name="Illegal option">
<cmd>
manpath -i
</cmd>
</test-case>

</test-suite>
40 changes: 40 additions & 0 deletions tests/rot13.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0"?>
<test-suite program="rot13" processor="b2bt 1.1" ID="@(#) $Id: rot13.xml - back to back test suite for rot13 v1.0.0 (November 1, 2021) by Hubert Tournier $">

<test-case name="Usual call">
<cmd>
echo test | rot13
</cmd>
</test-case>

<test-case name="Double call">
<cmd>
echo test | rot13 | rot13
</cmd>
</test-case>

<test-case name="No arguments" timeout="0.5">
<cmd>
rot13
</cmd>
</test-case>

<test-case name="With file argument" timeout="0.5">
<cmd>
ROT13_FLAVOUR=bsd:freebsd rot13 /etc/passwd
</cmd>
</test-case>

<test-case name="With string argument" timeout="0.5">
<cmd>
ROT13_FLAVOUR=bsd:freebsd rot13 "my secret"
</cmd>
</test-case>

<test-case name="Illegal option" timeout="0.5">
<cmd>
ROT13_FLAVOUR=bsd:freebsd rot13 -i
</cmd>
</test-case>

</test-suite>
73 changes: 73 additions & 0 deletions tests/what.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0"?>
<test-suite program="what" processor="b2bt 1.1" ID="@(#) $Id: what.xml - back to back test suite for what v1.0.0 (October 31, 2021) by Hubert Tournier $">

<test-case name="Usual call">
<cmd>
what /usr/bin/unifdef
</cmd>
</test-case>

<test-case name="Multiple arguments">
<cmd>
what /usr/bin/unifdef /usr/bin/file
</cmd>
</test-case>

<test-case name="No arguments" timeout="0.5">
<cmd>
what
</cmd>
</test-case>

<test-case name="Standard input support">
<cmd>
cat /usr/bin/unifdef | what
</cmd>
</test-case>

<test-case name="Option -s">
<cmd>
what -s /usr/bin/unifdef
</cmd>
</test-case>

<test-case name="Option -q">
<cmd>
what -q /usr/bin/unifdef
</cmd>
</test-case>

<test-case name="Options terminator handling">
<cmd>
what -qs -- /usr/bin/unifdef
</cmd>
</test-case>

<test-case name="Illegal option">
<cmd>
what -i
</cmd>
</test-case>

<test-case name="Non existent file">
<cmd>
what nonexistent
</cmd>
</test-case>

<test-case name="Empty file">
<pre>
touch empty_file
</pre>
<cmd>
what empty_file
</cmd>
</test-case>

<test-case name="POSIXLY_CORRECT environment variable handling">
<cmd>
POSIXLY_CORRECT=true what -q /usr/bin/unifdef
</cmd>
</test-case>

</test-suite>

0 comments on commit 75bf0c4

Please sign in to comment.