diff --git a/ets2panda/test/tsconfig/paths/expected.txt b/ets2panda/test/tsconfig/paths/expected.txt index 40891aca9cf85bdabf81d710cd0188911e92e0cf..c5c7b152b8b8e2642da3dddd58c296650c2d4fcf 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 0000000000000000000000000000000000000000..d381e1491f3e782d9013790a60776dd1463087cf --- /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 c2e2ca05e4c4d4a9cb3c6c696d57eab72a6f83b9..fe12ef6d302436957eeb9863729082b9191ed916 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 b776f71ce082e37ee77bb4e880ab1749d648823c..f4cf280e456d91f252ee106e45e49cf6c7fa53a5 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": [