From 7d1537e4251caa7e08bea7ad41b2f1e3ad38a29d Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Mon, 17 Feb 2025 01:28:39 +0530 Subject: [PATCH] add test for exclude feature --- src/bootstrap/src/core/config/tests.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/bootstrap/src/core/config/tests.rs b/src/bootstrap/src/core/config/tests.rs index eff5e0337428..27968bea3186 100644 --- a/src/bootstrap/src/core/config/tests.rs +++ b/src/bootstrap/src/core/config/tests.rs @@ -515,3 +515,17 @@ fn test_explicit_stage() { assert!(!config.explicit_stage_from_config); assert!(!config.is_explicit_stage()); } + +#[test] +fn test_exclude() { + let config = parse("build.exclude=[\"test/codegen\"]"); + + let first_excluded = config + .skip + .first() + .expect("Expected at least one excluded path") + .to_str() + .expect("Failed to convert excluded path to string"); + + assert_eq!(first_excluded, "test/codegen"); +}