mirror of
				https://github.com/askama-rs/askama.git
				synced 2025-11-04 15:33:38 +00:00 
			
		
		
		
	Add test for path::get_template_source()
This commit is contained in:
		
							parent
							
								
									21885c06bf
								
							
						
					
					
						commit
						05f11a6843
					
				@ -51,9 +51,14 @@ pub fn get_template_source(tpl_file: &str) -> String {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#[cfg(test)]
 | 
					#[cfg(test)]
 | 
				
			||||||
mod tests {
 | 
					mod tests {
 | 
				
			||||||
    use super::find_template_from_path;
 | 
					    use super::{find_template_from_path, get_template_source};
 | 
				
			||||||
    use super::Path;
 | 
					    use super::Path;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #[test]
 | 
				
			||||||
 | 
					    fn get_source() {
 | 
				
			||||||
 | 
					        assert_eq!(get_template_source("sub/b.html"), "bar\n");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #[test]
 | 
					    #[test]
 | 
				
			||||||
    fn find_absolute() {
 | 
					    fn find_absolute() {
 | 
				
			||||||
        let path = find_template_from_path("sub/b.html", Some("a.html"));
 | 
					        let path = find_template_from_path("sub/b.html", Some("a.html"));
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user