Skip to content

Commit

Permalink
Merge pull request #155 from iinsertNameHere/148
Browse files Browse the repository at this point in the history
Fixed failed tests showing ass successful
  • Loading branch information
iinsertNameHere authored Nov 19, 2024
2 parents 538d929 + 0fcc6ab commit 268e207
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions scripts/test-commandline-args.sh
Original file line number Diff line number Diff line change
@@ -1,44 +1,63 @@
function VerifyTest() {
if [ $? -ne 0 ]; then
exit 1
fi
}

#### TESTS ####

# Test Normal run
echo "[!] Testing: Normal Run"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -n
VerifyTest

# Test help
echo "[!] Testing: Help"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -h -n
VerifyTest

# Test version
echo "[!] Testing: Version"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -v -n
VerifyTest

# Test distroid
echo "[!] Testing: DistroId"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -d arch -n
VerifyTest

# Test grep
echo "[!] Testing: Grep"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -g kernel -n
VerifyTest

# Test margin
echo "[!] Testing: Margin"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -m 1,2,3 -n
VerifyTest

# Test layout
echo "[!] Testing: Layout"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -l ArtOnTop -n
VerifyTest

# Test figletlogos mode
echo "[!] Testing: FigletLogos"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -fe on -n
VerifyTest

# Test figletlogos margin
echo "[!] Testing: FigletLogos Margin"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -fe on -fm 1,2,3 -n
VerifyTest

# Test figletlogos font with example figlet font file
echo "[!] Testing: FigletLogos Font"
./../bin/catnap -c ./test_config.toml -a ../config/distros.toml -fe on -ff basic.flf -n
VerifyTest

# Test default Config
echo "[!] Testing: Default config"
./../bin/catnap -c ../config/config.toml -a ../config/distros.toml -n
VerifyTest

2 changes: 1 addition & 1 deletion src/catnaplib/terminal/logging.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import strformat
import "colors.nim"

proc logError*(msg: string, fatal: bool = true) =
echo Foreground.Red & &"ERROR: {msg}" & Default
stderr.writeLine Foreground.Red & &"ERROR: {msg}" & Default
if fatal: quit(1)

0 comments on commit 268e207

Please sign in to comment.