Index: compile_rules.py ================================================================== --- compile_rules.py +++ compile_rules.py @@ -577,16 +577,19 @@ traceback.print_exc() exit() # generating test files print(" generating test files...") - with open("tests/"+sLang+"/gc_test.txt", "w", encoding="utf-8", newline="\n") as hDstPy, \ - open("gc_lang/"+sLang+"/modules-js/tests_data.json", "w", encoding="utf-8", newline="\n") as hDstJS: + with open("tests/"+sLang+"/gc_test.txt", "w", encoding="utf-8", newline="\n") as hDstPy: hDstPy.write("# TESTS FOR LANG ["+sLang+"]\n\n") for sLine in lTest: hDstPy.write(sLine) - hDstJS.write('{ "aData": ' + json.dumps(lTest, ensure_ascii=False) + " }\n") + + # tests + print(" list tests...") + sGCTests = "\n".join(lTest) + sGCTestsJS = '{ "aData": ' + json.dumps(lTest, ensure_ascii=False) + " }\n" # processing print(" preparing rules...") bParagraph = True lParagraphRules = [] @@ -636,12 +639,14 @@ displayStats(lParagraphRules, lSentenceRules) d = { "callables": sPyCallables, "callablesJS": sJSCallables, + "gctests": sGCTests, + "gctestsJS": sGCTestsJS, "paragraph_rules": mergeRulesByOption(lParagraphRules), "sentence_rules": mergeRulesByOption(lSentenceRules), "paragraph_rules_JS": writeRulesToJSArray(mergeRulesByOption(lParagraphRulesJS)), "sentence_rules_JS": writeRulesToJSArray(mergeRulesByOption(lSentenceRulesJS)) } d.update(dOptions) return d Index: gc_lang/fr/modules-js/tests_data.json ================================================================== --- gc_lang/fr/modules-js/tests_data.json +++ gc_lang/fr/modules-js/tests_data.json cannot compute difference between binary files