From 12e04fad83026d4ad78431870b5f7a32fbd73013 Mon Sep 17 00:00:00 2001 From: wuhailong Date: Wed, 18 May 2022 15:05:36 +0800 Subject: [PATCH] Modify the '-m' parameter Signed-off-by: wuhailong Change-Id: I613d28615686e6590d75931ddcecbf4456c71c1e --- 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