[][src]Crate temp_test

Temporary test utils for rust 🔨

A simple, efficient library for counting code in directories. This functionality is also provided as a CLI utility. Tokei uses a small state machine rather than regular expressions found in other code counters. Tokei can accurately count a lot more edge cases such as nested comments, or comment syntax inside string literals.


Run a command against in your library.

use clap::{Arg, App};
fn main_test() {
  let matches = App::new("My Super Program")
          .about("controls testing features")
  // do some action with the matches..

fn test_example() {
  let p = temp_test::build_project("test_example").build();
  assert!(p.has_file("Cargo.toml"), "Cargo.toml file does not exist");
  let result = p.command("test").arg("debug").run();
  assert!(result.is_success(), "Result was unsuccessful {:?}", result);