diff options
Diffstat (limited to 'src/makefile/input.rs')
-rw-r--r-- | src/makefile/input.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/makefile/input.rs b/src/makefile/input.rs index 5dda538..5a1259f 100644 --- a/src/makefile/input.rs +++ b/src/makefile/input.rs @@ -1177,4 +1177,21 @@ test: c ); Ok(()) } + + #[cfg(feature = "full")] + #[test] + fn export_assign() -> R { + let file = "export x = 3"; + let args = Args::empty(); + let makefile = MakefileReader::read(&args, MacroSet::new(), Cursor::new(file), "")?; + let makefile = makefile.finish(); + assert_eq!( + makefile.macros.get("x").map(|x| &x.text), + Some(&TokenString::text("3")) + ); + assert!( + matches!(makefile.macro_exports, ExportConfig::Only(exported) if exported.contains("x")) + ); + Ok(()) + } } |