"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/src/ci_test.sh" (12 May 2020, 1298 Bytes) of package /windows/www/highlight-3.57-x64.zip:


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. 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 "ci_test.sh": 3.54_vs_3.55.

    1 #!/bin/bash
    2 
    3 # cwd: unpacked tarball dir
    4 echo "Starting CI verification script"
    5 
    6 git clone --depth 1 https://gitlab.com/tajmone/highlight-test-suite/
    7 
    8 #OUTPUT=`./src/highlight --list-scripts=langs`
    9 HL_BIN=./src/highlight
   10 TEST_DIR=./highlight-test-suite
   11 
   12 ${HL_BIN} --list-scripts=langs
   13 
   14 if [ $? -eq 0 ]; then
   15     echo "--list-scripts OK"
   16 else
   17     echo "--list-scripts FAILED"
   18     exit 1
   19 fi
   20 
   21 
   22 # new set of test scripts
   23 
   24 declare -a arr=("bash" "cpp" "exapunks" "hugo" "js" "lua"  "nim"  "perl"  "purebasic" "ruby")
   25 
   26 for d in "${arr[@]}"
   27 do
   28     bash ${TEST_DIR}/$d/regression.sh
   29     if [ $? -eq 0 ]; then
   30         echo "$d regression tests OK"
   31     else
   32         echo "$d regression tests FAILED"
   33         exit 1
   34     fi
   35 done
   36 
   37 
   38 # special configurations
   39 
   40 echo '#!/usr/bin/perl' | ${HL_BIN} --verbose 2>&1 >/dev/null |  grep 'Description: Perl'
   41 if [ $? -eq 0 ]; then
   42     echo "stdin shebang test #1 OK"
   43 else
   44     echo "stdin shebang #1 FAILED"
   45     exit 1
   46 fi
   47 
   48 echo '#!/usr/bin/perl' | ${HL_BIN} --syntax-by-name xxx.py --verbose 2>&1 >/dev/null |  grep 'Description: Python'
   49 if [ $? -eq 0 ]; then
   50     echo "stdin shebang test #2 OK"
   51 else
   52     echo "stdin shebang #2 FAILED"
   53     exit 1
   54 fi
   55 
   56 echo 'ENFORCER' | ${HL_BIN} --force --fragment -O html | grep 'ENFORCER'
   57 if [ $? -eq 0 ]; then
   58     echo "force option test #1 OK"
   59 else
   60     echo "force option test #1 FAILED"
   61     exit 1
   62 fi
   63