"Fossies" - the Fresh Open Source Software Archive

Member "detox-1.4.5/tests/tests/github-issue-0011/test.sh" (15 Aug 2021, 1259 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 # Tests to confirm GitHub issue #11 is resolved
    4 #
    5 # https://github.com/dharple/detox/issues/11
    6 #
    7 
    8 set -e
    9 
   10 if [ -z "$TESTBASE" ] ; then
   11     echo TESTBASE needs to be passed via the env
   12     exit 1
   13 fi
   14 
   15 . $TESTBASE/test-functions
   16 
   17 DETOX=$1
   18 INPUT=$(printf '     '$'\n\n''song name'$'\n''by band'$'\n''/')
   19 OUTPUT="_______song_name_by_band_"
   20 METHOD="safe"
   21 TABLE=$(dirname $TESTBASE)/table/safe.tbl.sample
   22 
   23 test_single_table "$DETOX" "$INPUT" "$OUTPUT" "$METHOD" "$TABLE"
   24 
   25 # ---------------------------------------------------------------------------
   26 
   27 METHOD1=safe
   28 TABLEPATH=$(dirname $TESTBASE)/table
   29 
   30 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1"
   31 
   32 # ---------------------------------------------------------------------------
   33 
   34 METHOD1=safe-basic
   35 
   36 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1"
   37 
   38 # ---------------------------------------------------------------------------
   39 
   40 OUTPUT="$INPUT"
   41 METHOD1=uncgi
   42 
   43 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1"
   44 
   45 # ---------------------------------------------------------------------------
   46 
   47 OUTPUT="song_name_by_band_"
   48 METHOD1=uncgi
   49 METHOD2=safe
   50 METHOD3=wipeup
   51 
   52 test_sequence "$DETOX" "$INPUT" "$OUTPUT" "$TABLEPATH" "$METHOD1" "$METHOD2" "$METHOD3"