//! The generated files: where they go in the project, and the lines each starts with.
pub use isoloom_spec::files::GeneratedFile;
/// Where generated files go, relative to the project folder.
pub const OUTPUT_DIR: &str = ".isoloom";
/// The first lines of every generated file: it is generated and how to change it (`comment`
/// is the file's comment marker, `#` or `//`).
#[must_use]
pub fn header(comment: &str) -> String {
format!(
"{comment} Generated by isoloom from isoloom.yml. Don't edit: change isoloom.yml and run\n{comment} `isoloom generate`. `isoloom check` fails when this file is out of date.\n"
)
}
#[cfg(test)]
mod tests {
#[test]
fn the_header_says_how_to_change_the_file_in_its_own_comments() {
assert_eq!(
super::header("//"),
"// Generated by isoloom from isoloom.yml. Don't edit: change isoloom.yml and run\n// `isoloom generate`. `isoloom check` fails when this file is out of date.\n"
);
}
}