use std::path::Path; use alt_controller_image::Profile; #[test] fn profile_expands_vendored_package_lists_and_discards_comments() { let profile = Profile::load(Path::new("profiles/alt-controller.profile")) .expect("target profile must parse"); assert!(profile.packages.contains(&"fakeroot".to_owned())); assert!(profile.packages.contains(&"openssh-server".to_owned())); assert!(profile.packages.contains(&"systemd-sysvinit".to_owned())); assert!(profile.packages.contains(&"libiec61850".to_owned())); assert!(!profile.packages.iter().any(|entry| entry.starts_with('#'))); assert!(profile.regex_packages.contains(&"^kernel-(image|modules-())-(rt)$".to_owned())); }