Skip to content

CLI tests with dummy core pass unexpectedly on Windows #38

@dail8859

Description

@dail8859

The CLI tests only validate that the executable returned a 0 exit code, it does not validate the textual output of the command.

My app output something such as "dummy output" and it still passes the two version switch tests. I do not know much about CMake, however it looks like this function needs to accept parameters.

function(new_ec_cli_test)
# Parse args
set(one_value_keywords NAME MATCH)
set(multi_value_keywords ARGS)
cmake_parse_arguments(P
"" "${one_value_keywords}" "${multi_value_keywords}" ${ARGN})
# Add test
add_test(NAME ${P_NAME} COMMAND ${EDITORCONFIG_CMD} ${P_ARGS})
set_tests_properties(${name} PROPERTIES PASS_REGULAR_EXPRESSION "${P_MATCH}")
endfunction()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions