test: Add regression test for importing only at the top level (#7104)

Add regression test for importing only at the top level
This commit is contained in:
Jonathan Tran
2025-05-20 11:43:48 -04:00
committed by GitHub
parent 223a4ad45d
commit 511334683a
11 changed files with 274 additions and 0 deletions

View File

@ -996,6 +996,27 @@ mod import_cycle1 {
super::execute(TEST_NAME, false).await
}
}
mod import_only_at_top_level {
const TEST_NAME: &str = "import_only_at_top_level";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, false).await
}
}
mod import_function_not_sketch {
const TEST_NAME: &str = "import_function_not_sketch";