"Fossies" - the Fresh Open Source Software Archive

Member "detox-1.4.5/tests/tests/legacy-uncgi/test.sh" (15 Aug 2021, 1512 Bytes) of package /linux/privat/detox-1.4.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "test.sh": 1.4.2_vs_1.4.3.

    1 #!/usr/bin/env bash
    2 #
    3 # Subset of legacy regression tests: uncgi
    4 #
    5 
    6 set -e
    7 
    8 if [ -z "$TESTBASE" ] ; then
    9     echo TESTBASE needs to be passed via the env
   10     exit 1
   11 fi
   12 
   13 . $TESTBASE/test-functions
   14 
   15 DETOX=$1
   16 TABLEPATH=$(dirname $TESTBASE)/table
   17 METHOD1=uncgi
   18 METHOD2=safe
   19 METHOD3=wipeup
   20 
   21 # ---------------------------------------------------------------------------
   22 
   23 INPUT="%3Dequals"
   24 OUTPUT="=equals"
   25 
   26 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   27 
   28 # ---------------------------------------------------------------------------
   29 
   30 INPUT="%25percent"
   31 OUTPUT="%percent"
   32 
   33 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   34 
   35 # ---------------------------------------------------------------------------
   36 
   37 INPUT="%3Fquestion%20mark"
   38 OUTPUT="question_mark"
   39 
   40 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   41 
   42 # ---------------------------------------------------------------------------
   43 
   44 INPUT="%2bplus"
   45 OUTPUT="+plus"
   46 
   47 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   48 
   49 
   50 # ---------------------------------------------------------------------------
   51 
   52 INPUT="%2ccomma"
   53 OUTPUT=",comma"
   54 
   55 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   56 
   57 # ---------------------------------------------------------------------------
   58 
   59 INPUT="%2Fslash"
   60 OUTPUT="slash"
   61 
   62 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"