Open dail8859 opened 4 years ago
Thanks for the report! Would you please attach or point us to your test code, so we can reproduce the problem? The set_tests_properties
line sets the regex to check in the output. Much appreciated!
I do not have any easy shareable example currently but it should not be hard to verify with any of the other cores.
Shouldn't new_ec_cli_test
accept parameters like the other new_xxx
functions?
It does! cmake_parse_arguments is the function that extracts the args. CMake syntax is very strange.
What project are you working on? You have opened a number of issues recently, and we could better assist if we knew the big picture.
In the mean time, I am closing this issue in the absence of a test case.
CMake syntax is very strange.
Indeed it is!
What project are you working on?
I'm writing an editorconfig core for Qt5
in the absence of a test case.
I'm using Windows for this test...
mkdir mytest
cd mytest
git clone https://github.com/editorconfig/editorconfig-core-test
CMakeLists.txt
with this text:
cmake_minimum_required(VERSION 3.17)
project(mytest NONE)
enable_testing()
set(EDITORCONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/test.bat )
add_subdirectory(editorconfig-core-test)
message( ${CMAKE_CURRENT_SOURCE_DIR} )test.bat
with this text
echo "nothing"cmake .
ctest -C Release -R switch
(no clue why I have to include the -C Release on my system but it complains if it is missing...the -R will just run the two version switch tests)Yep. Very aware of that issue. Even commented in it :)
Oh never mind. You are probably just linking the issue and not pointing it out to me specifically :)
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.
https://github.com/editorconfig/editorconfig-core-test/blob/48610d43b7455af12195473377f93c4ceea654f5/CMakeLists.txt#L105-L116