"Fossies" - the Fresh Open Source Software Archive

Member "detox-1.4.5/tests/tests/legacy-iso8859_1/test.sh" (15 Aug 2021, 1389 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: iso8859_1
    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=iso8859_1
   18 METHOD2=safe
   19 METHOD3=wipeup
   20 
   21 # ---------------------------------------------------------------------------
   22 
   23 INPUT="safe string"
   24 OUTPUT="safe_string"
   25 
   26 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   27 
   28 # ---------------------------------------------------------------------------
   29 
   30 INPUT=$(printf "\\xAE reg")
   31 OUTPUT="reg_reg"
   32 
   33 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   34 
   35 # ---------------------------------------------------------------------------
   36 
   37 INPUT=$(printf "\\xA9 copy")
   38 OUTPUT="copy_copy"
   39 
   40 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   41 
   42 # ---------------------------------------------------------------------------
   43 
   44 INPUT=$(printf "\\xC6 capital AE")
   45 OUTPUT="AE_capital_AE"
   46 
   47 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   48 
   49 # ---------------------------------------------------------------------------
   50 
   51 INPUT=$(printf "\\xDE capital thorn")
   52 OUTPUT="TH_capital_thorn"
   53 
   54 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"
   55