trycall 0.1.0

An utility similar to trybuild but for testing functions that takes a string as input and returns a string as output.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub fn add_one(s: &str) -> String {
    s.parse::<i32>().map(|n| (n + 1).to_string()).unwrap()
}

fn main() {}

#[cfg(test)]
mod tests {
    #[test]
    fn add_one() {
        // The path here is always relative from the crate root.
        trycall::trycall!("examples/add_one/tests").with(super::add_one);
    }
}