File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -292,3 +292,26 @@ impl Module {
292292 input. into ( )
293293 }
294294}
295+
296+ #[ cfg( test) ]
297+ mod tests {
298+ use crate :: module:: Module ;
299+ use crate :: module:: ModuleType ;
300+ use crate :: Options ;
301+
302+ #[ test]
303+ fn check_module_fields ( ) {
304+ let options = Options {
305+ comments : false ,
306+ prefixes : true ,
307+ target_dir : "." . to_string ( ) ,
308+ detect_directory : true ,
309+ } ;
310+ let module = Module :: new ( ModuleType :: Assembly , "A testing assembly with /special-characters*" , & options) ;
311+
312+ // We can't test this until we implement a way to compare the enum values
313+ // assert_eq!(module.mod_type, ModuleType::Assembly);
314+ assert_eq ! ( module. title, "A testing assembly with /special-characters*" . to_string( ) ) ;
315+ assert_eq ! ( module. id, "a-testing-assembly-with-special-characters" . to_string( ) ) ;
316+ }
317+ }
You can’t perform that action at this time.
0 commit comments