From cd32055e562e1ab2ef4eaa5499e10bfff974808b Mon Sep 17 00:00:00 2001 From: wuhailong Date: Thu, 19 May 2022 19:17:58 +0800 Subject: [PATCH] Modify the '-m' parameter Signed-off-by: wuhailong Change-Id: I1e895497ccee664deedae75f01a840a703a45e27 --- testTs/import_tests.json | 7 +++++++ testTs/run_testTs.py | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/testTs/import_tests.json b/testTs/import_tests.json index c41307e61c..5bd054ac6d 100644 --- a/testTs/import_tests.json +++ b/testTs/import_tests.json @@ -7,5 +7,12 @@ "./testTs/test/externalModules/typeOnly/importDefaultNamedType/importDefaultNamedType.ts", "./testTs/test/moduleResolution/scopedPackages/scopedPackages.ts", "./testTs/test/moduleResolution/scopedPackagesClassic/scopedPackagesClassic.ts" + ], + "m_parameter" : [ + "./testTs/test/internalModules/DeclarationMerging/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.ts", + "./testTs/test/jsdoc/constructorTagOnClassConstructor.ts", + "./testTs/test/jsdoc/declarations/jsDeclarationsThisTypes.ts", + "./testTs/test/declarationEmit/declarationEmitWorkWithInlineComments.ts", + "./testTs/test/declarationEmit/exportDefaultNamespace.ts" ] } \ No newline at end of file diff --git a/testTs/run_testTs.py b/testTs/run_testTs.py index 2d176f1ed3..bbc1637553 100644 --- a/testTs/run_testTs.py +++ b/testTs/run_testTs.py @@ -84,7 +84,10 @@ def run_test(file, tool, flag=False): if not os.path.exists(out_dir_path): os.makedirs(out_dir_path) try: - command_os(['node', '--expose-gc', tool, '-m', file, '--output-type']) + if file in IMPORT_TEST['import'] + IMPORT_TEST['m_parameter']: + command_os(['node', '--expose-gc', tool, '-m', file, '--output-type']) + else: + command_os(['node', '--expose-gc', tool, file, '--output-type']) except BaseException as e: print(e) if flag: -- Gitee