<commit_before># Basic Template Test for automatic run a scenario that produce a file to be compared to a reference file
# You need to set the name of the test according to name of scenario file and reference file
SET(TEST_NAME SinusOscillator)
SET(SCENARIO_TO_TEST "${TEST_NAME}.xml")

IF(WIN32)
	SET(EXT cmd)
	SET(OS_FLAGS "--no-pause")
ELSE(WIN32)
	SET(EXT sh)
	SET(OS_FLAGS "")
ENDIF(WIN32)

ADD_TEST(clean_${TEST_NAME} "rm" "-f" "${TEST_NAME}.csv")
ADD_TEST(run_${TEST_NAME} "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--no-gui" "--play" ${SCENARIO_TO_TEST})
ADD_TEST(comparator_${TEST_NAME} "diff" "${TEST_NAME}.csv" "${TEST_NAME}.ref.csv")

## add some properties that help to debug
IF(WIN32)
	SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL "$ENV{APPDATA}/openvibe/log/openvibe-designer.log"})
ELSE(WIN32)
	SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL "$ENV{HOME}/.config/openvibe/log/openvibe-designer.log"})
ENDIF(WIN32)
SET_TESTS_PROPERTIES(comparator_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL "${TEST_NAME}.csv"})
SET_TESTS_PROPERTIES(comparator_${TEST_NAME} PROPERTIES DEPENDS run_${TEST_NAME}})
SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME}})<commit_msg>tests:  * Testing if we can get rid of the CRLF/LF mismatch issues with --strip-trailing-cr<commit_after># Basic Template Test for automatic run a scenario that produce a file to be compared to a reference file
# You need to set the name of the test according to name of scenario file and reference file
SET(TEST_NAME SinusOscillator)
SET(SCENARIO_TO_TEST "${TEST_NAME}.xml")

IF(WIN32)
	SET(EXT cmd)
	SET(OS_FLAGS "--no-pause")
ELSE(WIN32)
	SET(EXT sh)
	SET(OS_FLAGS "")
ENDIF(WIN32)

ADD_TEST(clean_${TEST_NAME} "rm" "-f" "${TEST_NAME}.csv")
ADD_TEST(run_${TEST_NAME} "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--no-gui" "--play" ${SCENARIO_TO_TEST})
ADD_TEST(comparator_${TEST_NAME} "diff" "--strip-trailing-cr" "${TEST_NAME}.csv" "${TEST_NAME}.ref.csv")

## add some properties that help to debug
IF(WIN32)
	SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL "$ENV{APPDATA}/openvibe/log/openvibe-designer.log"})
ELSE(WIN32)
	SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL "$ENV{HOME}/.config/openvibe/log/openvibe-designer.log"})
ENDIF(WIN32)
SET_TESTS_PROPERTIES(comparator_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL "${TEST_NAME}.csv"})
SET_TESTS_PROPERTIES(comparator_${TEST_NAME} PROPERTIES DEPENDS run_${TEST_NAME}})
SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME}})
{'fraction_non_alphanumeric': 0.13739591218773656, 'fraction_numerical': 0.009084027252081756, 'mean_word_length': 7.81, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6881422', 'n_tokens_mistral': 1032, 'n_tokens_neox': 1001, 'n_words': 205}