feat: fix autoformatting around one liners
This commit is contained in:
1 parent
64d669e934
commit
fa9ebe17cc
18 files changed
+259
-699
No files matched your search
@@ -0,0 +1,25 @@
|
||||
macro_rules! twoway {
|
||||
($val:literal => $name:ident) => {
|
||||
#[test]
|
||||
fn $name() {
|
||||
let src = include_str!(concat!("./samples/", $val, ".rsx"));
|
||||
let formatted = dioxus_autofmt::fmt_file(src);
|
||||
let out = dioxus_autofmt::apply_formats(src, formatted);
|
||||
pretty_assertions::assert_eq!(&src, &out);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
twoway! ("simple" => simple);
|
||||
|
||||
twoway! ("comments" => comments);
|
||||
|
||||
twoway! ("attributes" => attributes);
|
||||
|
||||
twoway! ("manual_props" => manual_props);
|
||||
|
||||
twoway! ("complex" => complex);
|
||||
|
||||
twoway! ("tiny" => tiny);
|
||||
|
||||
twoway! ("tinynoopt" => tinynoopt);
|
||||
Reference in new issue
Block a user