aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-13 16:56:35 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-13 16:56:35 -0600
commitb25fb845280bf3717644371efd7f4f73705ec808 (patch)
tree680365f8eaef752fc9f9b90fbf237d97f72a51d9
parentcdf6dc5da3730657fa8c2b52ce5cd69d2711333f (diff)
downloadmakers-b25fb845280bf3717644371efd7f4f73705ec808.tar.gz
makers-b25fb845280bf3717644371efd7f4f73705ec808.zip
what in the goddamn fuck
-rw-r--r--src/makefile/input.rs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/makefile/input.rs b/src/makefile/input.rs
index e8e2e95..0618109 100644
--- a/src/makefile/input.rs
+++ b/src/makefile/input.rs
@@ -971,4 +971,41 @@ clean:
assert!(makefile.targets.contains_key("server"));
Ok(())
}
+
+ #[test]
+ fn comment_bullshit() -> R {
+ let file = "
+foo: bar baz#swag
+example: test\\#post
+info:
+\thello # there
+";
+ eprintln!("{}", file);
+ let args = Args::empty();
+ let makefile = MakefileReader::read(&args, MacroSet::new(), Cursor::new(file), "")?;
+ let makefile = makefile.finish();
+ assert_eq!(
+ makefile.targets["foo"],
+ Target {
+ name: "foo".to_owned(),
+ prerequisites: vec!["bar".to_owned(), "baz".to_owned()],
+ commands: vec![],
+ stem: None,
+ already_updated: Cell::new(false)
+ }
+ );
+ dbg!(&makefile.targets);
+ assert_eq!(
+ makefile.targets["example"],
+ Target {
+ name: "example".to_owned(),
+ prerequisites: vec!["test#post".to_owned()],
+ commands: vec![],
+ stem: None,
+ already_updated: Cell::new(false)
+ }
+ );
+
+ Ok(())
+ }
}