Giter VIP home page Giter VIP logo

Comments (2)

rafritts avatar rafritts commented on May 23, 2024 1

This issue has been corrected via commit 270d3b4. Closing. Sorry it too so long.

from bunit.

eedwards-sk avatar eedwards-sk commented on May 23, 2024

isolated first instance to __assert method:

local line

should be

local line=
__assert () {
    local correct_num_of_args=${1}
    local callback_function=${2}
    local callback_args=${3}
    local actual_num_of_args=${4}
    local failure_msg=${5}

    local test_case_calling_assert=${FUNCNAME[2]}
    local assert_caller_func_name=${FUNCNAME[1]}

    line=$(echo $"(caller 1)" | awk '{print $1}')
    local line

    if [ "$(correctNumberOfArgs "${actual_num_of_args}" "${correct_num_of_args}")" = "true" ]; then
        result=$(${callback_function} "${callback_args}")

        if [ "${result}" = "true" ]; then
            [[ "$VERBOSE_MODE" = "true" ]] && echo "Line ${line}: Passed - ${test_case_calling_assert}"
            incrementPassedTests
        else
            echo "Line ${line}: ${test_case_calling_assert}: ${assert_caller_func_name}() failed. $failure_msg"
            incrementFailedTests
        fi
    else
        echo "Line $line: $test_case_calling_assert: ${assert_caller_func_name}() failed. Expected ${correct_num_of_args} argument(s)."
        incrementFailedTests
    fi
}

from bunit.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.