From 50ec0b4d32b5fcbe0038b0e29a1223dbdce406d5 Mon Sep 17 00:00:00 2001 From: vagin ivan Date: Wed, 24 Jan 2024 18:38:00 +0300 Subject: [PATCH] [ets2panda] Match largest alias from arktsconfig Signed-off-by: vagin ivan --- ets2panda/test/tsconfig/paths/expected.txt | 1 + .../test/tsconfig/paths/lib/module22/lib.ets | 20 +++++++++++++++++++ ets2panda/test/tsconfig/paths/main.ets | 2 ++ ets2panda/test/tsconfig/paths/tsconfig.json | 3 ++- 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ets2panda/test/tsconfig/paths/lib/module22/lib.ets diff --git a/ets2panda/test/tsconfig/paths/expected.txt b/ets2panda/test/tsconfig/paths/expected.txt index 40891aca9c..c5c7b152b8 100755 --- a/ets2panda/test/tsconfig/paths/expected.txt +++ b/ets2panda/test/tsconfig/paths/expected.txt @@ -1,3 +1,4 @@ ./build/lib/module1/lib.abc ./build/lib/module2/lib.abc +./build/lib/module22/lib.abc ./build/main.abc diff --git a/ets2panda/test/tsconfig/paths/lib/module22/lib.ets b/ets2panda/test/tsconfig/paths/lib/module22/lib.ets new file mode 100644 index 0000000000..d381e1491f --- /dev/null +++ b/ets2panda/test/tsconfig/paths/lib/module22/lib.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package Baz; + +export function Baz(): void { + console.println("Baz"); +} diff --git a/ets2panda/test/tsconfig/paths/main.ets b/ets2panda/test/tsconfig/paths/main.ets index c2e2ca05e4..fe12ef6d30 100644 --- a/ets2panda/test/tsconfig/paths/main.ets +++ b/ets2panda/test/tsconfig/paths/main.ets @@ -15,8 +15,10 @@ import { Foo } from "@package/component1/lib" import { Bar } from "@package/component2" +import { Baz } from "@package/component22" function main() : void { Foo(); Bar(); + Baz(); } diff --git a/ets2panda/test/tsconfig/paths/tsconfig.json b/ets2panda/test/tsconfig/paths/tsconfig.json index b776f71ce0..f4cf280e45 100644 --- a/ets2panda/test/tsconfig/paths/tsconfig.json +++ b/ets2panda/test/tsconfig/paths/tsconfig.json @@ -3,7 +3,8 @@ "outDir": "build", "paths": { "@package/component1/*": ["./lib/module1/*"], - "@package/component2": ["./lib/module2/"] + "@package/component2": ["./lib/module2/"], + "@package/component22": ["./lib/module22/"] } }, "include": [ -- Gitee