fn new(test_file: Test<PathBuf>) -> Vec<Test<Self>> {
        let mut cases = Vec::with_capacity(2);
        let path = &test_file.data;
        let content = fs::read(path).map(String::from_utf8).unwrap().unwrap();

        let mut builder = TestCaseBuilder::new(&mut cases, &test_file);

        let slide_emit_test = match SlideEmitTest::new(&test_file, content) {
            Ok(test) => test,
            Err(failed_test) => {
                builder.add(failed_test);
                return cases;
            }
        };

        if *TEST_LATEX_EMIT
            && (slide_emit_test.args.contains(" latex") || slide_emit_test.args.contains("=latex"))
            && slide_emit_test.exitcode.trim() == "0"
        {
            // The check could be better, but this will do for now.
            builder.add_suffixed(LaTeXEmitTest::from(&slide_emit_test), " latex emit");
        }

        builder.add(slide_emit_test);
        cases
    }
/// Creates a set of test cases from a slide system test file.
Creates a set of test cases from a slide system test file.
Creates a set of test cases from a slide system test file .
fn new(test_file: Test<PathBuf>) -> Vec<Test<Self>> {
        let mut cases = Vec::with_capacity(2);
        let path = &test_file.data;
        let content = fs::read(path).map(String::from_utf8).unwrap().unwrap();
        let mut builder = TestCaseBuilder::new(&mut cases, &test_file);
        let slide_emit_test = match SlideEmitTest::new(&test_file, content) {
            Ok(test) => test,
            Err(failed_test) => {
                builder.add(failed_test);
                return cases;
            }
        };
        if *TEST_LATEX_EMIT
            && (slide_emit_test.args.contains(" latex") || slide_emit_test.args.contains("=latex"))
            && slide_emit_test.exitcode.trim() == "0"
        {
            // The check could be better, but this will do for now.
            builder.add_suffixed(LaTeXEmitTest::from(&slide_emit_test), " latex emit");
        }
        builder.add(slide_emit_test);
        cases
    }
fn new ( test_file : Test < PathBuf > ) -> Vec < Test < Self > > { let mut cases = Vec :: with_capacity ( 2 ) ; let path = & test_file . data ; let content = fs :: read ( path ) . map ( String :: from_utf8 ) . unwrap ( ) . unwrap ( ) ; let mut builder = TestCaseBuilder :: new ( & mut cases , & test_file ) ; let slide_emit_test = match SlideEmitTest :: new ( & test_file , content ) { Ok ( test ) => test , Err ( failed_test ) => { builder . add ( failed_test ) ; return cases ; } } ; if * TEST_LATEX_EMIT && ( slide_emit_test . args . contains ( " " ) || slide_emit_test . args . contains ( " " ) ) && slide_emit_test . exitcode . trim ( ) == " " { // The check could be better, but this will do for now. builder . add_suffixed ( LaTeXEmitTest :: from ( & slide_emit_test ) , " " ) ; } builder . add ( slide_emit_test ) ; cases }
Creates a set of test cases from a slide system test file.
Creates a set of test cases from a slide system test file .
test_file
Test<PathBuf>
test_file
Test<PathBuf>