// This file is auto-generated! Any changes to this file will be lost! mod tests { use woothee::parser::Parser; #[test] fn test_{{test_fnname}}() { let parser = Parser::new(); {% for test in tests -%} {%- set skip_version_test = is_skip_test_for_version(name=test.target) -%} match parser.parse(r#"{{test.target}}"#) { None => panic!(r#"invalid parse. "{{test.target}}""#), Some(result) => { {% if test.category -%} assert_eq!(result.category, "{{test.category}}"); {% else -%} assert_eq!(result.category, "UNKNOWN"); {% endif -%} {% if test.name -%} assert_eq!(result.name, "{{test.name}}"); {% else -%}assert_eq!(result.name, "UNKNOWN"); {% endif -%} {% if test.os -%} assert_eq!(result.os, "{{test.os}}"); {% else -%}assert_eq!(result.os, "UNKNOWN"); {% endif -%} {% if test.os_version -%} {%- if is_skip_test_for_os_version(name=test.target) -%} // NOTE: skip test now //assert_eq!(result.os_version, "{{test.os_version}}".to_string()); {% else -%} assert_eq!(result.os_version, "{{test.os_version}}".to_string()); {% endif -%} {% else -%} {%- if is_skip_test_for_os_version(name=test.target) -%} // NOTE: skip test now //assert_eq!(result.os_version, "UNKNOWN".to_string()); {% else -%} assert_eq!(result.os_version, "UNKNOWN".to_string()); {% endif -%} {% endif -%} {% if test.version -%} {%- if is_skip_test_for_version(name=test.target) -%} {{ " " }}// NOTE: skip test now //assert_eq!(result.version, "{{test.version}}"); {% else -%} {{ " " }}assert_eq!(result.version, "{{test.version}}"); {% endif -%} {% else -%} {% if is_skip_test_for_version(name=test.target) -%} {{ " " }}// NOTE: skip test now //assert_eq!(result.version, "UNKNOWN"); {% else -%} {{ " " }}assert_eq!(result.version, "UNKNOWN"); {% endif -%} {% endif -%} } } {% endfor -%} } }