<commit_before>#undef NDEBUG  //because we are using assert to check actual operations that cannot be skipped in release mode testing
#include <cassert>

#include <exodus/program.h>

programinit()

	function main() {

	TRACE(osgetenv("PATH"))
	TRACE(osgetenv())
	TRACE(oslist())
    assert(osshellread("./testcommandline '(ab)'") eq "testcommandline (ab)\ntestcommandline\nab\n");
    assert(osshellread("./testcommandline '{ab}'") eq "testcommandline {ab}\ntestcommandline\nab\n");

    assert(osshellread("./testcommandline a b c '(ab)'") eq "testcommandline a b c (ab)\ntestcommandline^a^b^c\nab\n");
    assert(osshellread("./testcommandline a b c '{ab}'") eq "testcommandline a b c {ab}\ntestcommandline^a^b^c\nab\n");

    assert(osshellread("./testcommandline a b c '(a b)'").outputl() eq "testcommandline a b c (a b)\ntestcommandline^a^b^c\na b\n");
    assert(osshellread("./testcommandline a b c '{a b}'").outputl() eq "testcommandline a b c {a b}\ntestcommandline^a^b^c\na b\n");

    assert(osshellread("./testcommandline a b c '(' a or b ')'").outputl() eq "testcommandline a b c ( a or b )\ntestcommandline^a^b^c^(^a^or^b^)\n\n");

	// Syntax error
//    assert(osshellread("./testcommandline a b c (a b)").outputl() eq "testcommandline a b c (a b)\ntestcommandline^a^b^c^(a^b)\n\n");
//    assert(osshellread("./testcommandline a b c {a b}").outputl() eq "testcommandline a b c {a b}\ntestcommandline^a^b^c^{a^b}\n\n");

    assert(osshellread("./testcommandline '(' a b ')'") eq "testcommandline ( a b )\ntestcommandline^(^a^b^)\n\n");

	perform("testcommandlib a b c (xyz)");
	TRACE(USER1)
	// TODO COMMAND should be parsed in libexodus (exoprog.cpp) in FM separated parts as is done for COMMAND from the command line
	//assert(USER1 eq "testcommandlib a b c (xyz)\ntestcommandlib^a^b^c\nxyz\n");
	assert(USER1 eq "testcommandlib a b c (xyz)\ntestcommandlib a b c\nxyz\n");

	printl(elapsedtimetext());
	printl("Test passed");

	return 0;
}
programexit()<commit_msg>GITHUB test build calling other test programs<commit_after>#undef NDEBUG  //because we are using assert to check actual operations that cannot be skipped in release mode testing
#include <cassert>

#include <exodus/program.h>

programinit()

	function main() {

	TRACE(osgetenv("PATH"))
	TRACE(osgetenv())
	TRACE(oslist())
	TRACE(EXECPATH)
	var execdir = EXECPATH.field(OSSLASH, 1, fcount(EXECPATH, OSSLASH) - 1);
    assert(osshellread(execdir ^ "/testcommandline '(ab)'") eq "testcommandline (ab)\ntestcommandline\nab\n");
    assert(osshellread(execdir ^ "/testcommandline '{ab}'") eq "testcommandline {ab}\ntestcommandline\nab\n");

    assert(osshellread(execdir ^ "/testcommandline a b c '(ab)'") eq "testcommandline a b c (ab)\ntestcommandline^a^b^c\nab\n");
    assert(osshellread(execdir ^ "/testcommandline a b c '{ab}'") eq "testcommandline a b c {ab}\ntestcommandline^a^b^c\nab\n");

    assert(osshellread(execdir ^ "/testcommandline a b c '(a b)'").outputl() eq "testcommandline a b c (a b)\ntestcommandline^a^b^c\na b\n");
    assert(osshellread(execdir ^ "/testcommandline a b c '{a b}'").outputl() eq "testcommandline a b c {a b}\ntestcommandline^a^b^c\na b\n");

    assert(osshellread(execdir ^ "/testcommandline a b c '(' a or b ')'").outputl() eq "testcommandline a b c ( a or b )\ntestcommandline^a^b^c^(^a^or^b^)\n\n");

	// Syntax error
//    assert(osshellread(execdir ^ "/testcommandline a b c (a b)").outputl() eq "testcommandline a b c (a b)\ntestcommandline^a^b^c^(a^b)\n\n");
//    assert(osshellread(execdir ^ "/testcommandline a b c {a b}").outputl() eq "testcommandline a b c {a b}\ntestcommandline^a^b^c^{a^b}\n\n");

    assert(osshellread(execdir ^ "/testcommandline '(' a b ')'") eq "testcommandline ( a b )\ntestcommandline^(^a^b^)\n\n");

	if (libinfo("testcommandlib")) {
		perform("testcommandlib a b c (xyz)");
		TRACE(USER1)
		// TODO COMMAND should be parsed in libexodus (exoprog.cpp) in FM separated parts as is done for COMMAND from the command line
		//assert(USER1 eq "testcommandlib a b c (xyz)\ntestcommandlib^a^b^c\nxyz\n");
		assert(USER1 eq "testcommandlib a b c (xyz)\ntestcommandlib a b c\nxyz\n");
	}

	printl(elapsedtimetext());
	printl("Test passed");

	return 0;
}
programexit()
{'fraction_non_alphanumeric': 0.17033878227908078, 'fraction_numerical': 0.002369106846718787, 'mean_word_length': 4.815426997245179, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5805924', 'n_tokens_mistral': 1592, 'n_tokens_neox': 1533, 'n_words': 411}