From b564986f2797cc2818d1e0505775816d47641f71 Mon Sep 17 00:00:00 2001 From: tsxv478 Date: Fri, 30 Jun 2023 23:32:59 +0300 Subject: cleanup --- test.sh | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 test.sh (limited to 'test.sh') diff --git a/test.sh b/test.sh deleted file mode 100644 index 8f17172..0000000 --- a/test.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# gallery.sh Test Script -# -# https://github.com/lehmannro/assert.sh - -if [ ! -e assert.sh ]; then - echo "downloading unit test script" - curl -f "https://raw.githubusercontent.com/lehmannro/assert.sh/v1.1/assert.sh" -o assert.sh -fi - -# Copy demo files -cp images/demo/* ./ - -# shellcheck disable=SC1091 -source assert.sh - -# `echo test` is expected to write "test" on stdout -assert "echo test" "test" -# `seq 3` is expected to print "1", "2" and "3" on different lines -assert "seq 3" "1\\n2\\n3" -# exit code of `true` is expected to be 0 -assert_raises "true" -# exit code of `false` is expected to be 1 -assert_raises "false" 1 -# end of test suite -assert_end examples - -# $ bash gallery.sh -t Test -assert_raises "bash gallery.sh -t Test" - -assert "cat index.html | grep 'Test' | tr -d '\011\012\015'" 'Test' -assert "cat index.html | grep '__thumbs/Landscape_1.jpg.html' | tr -d '\011\012\015'" 'Thumbnail: Landscape_1.jpg' - -assert "cat __thumbs/Landscape_1.jpg.html | grep 'Landscape_1.jpg' | tr -d '\011\012\015'" 'Landscape_1.jpg' -assert "cat __thumbs/Landscape_1.jpg.html | grep 'Resolution' | tr -d '\040\011\012\015'" 'Resolution:600x450' - -assert_end gallery_sh -- cgit v1.2.3