38 lines
726 B
Rust
38 lines
726 B
Rust
#[cfg(feature = "dom")]
|
|
/// Create a virtual DOM.
|
|
pub mod dom;
|
|
|
|
/// All sorts of general use macros
|
|
pub mod macros;
|
|
|
|
/// Filesystem things
|
|
pub mod filesystem;
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use crate::filesystem::Fileify;
|
|
|
|
#[cfg(feature = "dom")]
|
|
#[test]
|
|
fn dom() {
|
|
use crate::dom;
|
|
|
|
let s = dom::element::Element::new("h1").to_string();
|
|
assert_eq!("<h1></h1>", s);
|
|
}
|
|
|
|
#[test]
|
|
fn into_macro() {
|
|
use crate::into;
|
|
|
|
let foo = "foo";
|
|
assert_eq!(String::from("foo"), into!(String, foo));
|
|
}
|
|
|
|
#[test]
|
|
fn fs() {
|
|
if let Ok(_) = std::path::Path::new("./file").ensure_file() {
|
|
let _ = std::fs::remove_file("./file");
|
|
}
|
|
}
|
|
}
|