���� JFIF    fdasasfas213sdaf403WebShell
403Webshell
Server IP : 147.79.69.183  /  Your IP : 216.73.216.200
Web Server : LiteSpeed
System : Linux in-mum-web669.main-hosting.eu 5.14.0-503.23.2.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 12 05:52:18 EST 2025 x86_64
User : u479334040 ( 479334040)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/bats-core/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/bats-core/validator.bash
#!/usr/bin/bash

bats_test_count_validator() {
  trap '' INT # continue forwarding
  header_pattern='[0-9]+\.\.[0-9]+'
  IFS= read -r header
  # repeat the header
  printf "%s\n" "$header"

  # if we detect a TAP plan
  if [[ "$header" =~ $header_pattern ]]; then
    # extract the number of tests ...
    local expected_number_of_tests="${header:3}"
    # ... count the actual number of [not ] oks...
    local actual_number_of_tests=0
    while IFS= read -r line; do
        # forward line
        printf "%s\n" "$line"
        case "$line" in
        'ok '*)
        (( ++actual_number_of_tests ))
        ;;
        'not ok'*)
        (( ++actual_number_of_tests ))
        ;;
        esac
    done
    # ... and error if they are not the same
    if [[ "${actual_number_of_tests}" != "${expected_number_of_tests}" ]]; then
        printf '# bats warning: Executed %s instead of expected %s tests\n' "$actual_number_of_tests" "$expected_number_of_tests"
        return 1
    fi
  else
    # forward output unchanged
    cat
  fi
}

Youez - 2016 - github.com/yon3zu
LinuXploit