INNER CODE UNIT · Rust

template_no_args

sharkdp/fd · src/exec/mod.rs:427

    fn template_no_args() {
        assert!(
            CommandTemplate::new::<Vec<_>, &'static str>(vec![], ExecutionMode::OneByOne).is_err()
        );
    }

    #[test]
    fn command_set_no_args() {
        assert!(CommandSet::new(vec![vec!["echo"], vec![]]).is_err());
    }

    #[test]
    fn placeholder_as_executable_rejected() {
        assert!(CommandSet::new(vec![vec!["{}"]]).is_ok());
        assert!(CommandSet::new(vec![vec!["{/}", "arg"]]).is_ok());
        assert!(CommandSet::new_batch(vec![vec!["{}"]]).is_err());
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…