Re-write integration tests in Rust (#67)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* Rewrite integration tests in Rust. * Improve failure output for integration tests. * Move TestEnv to separate module. * Remove old integration tests script. * Re-add integration test for subdirectory.
authored by Matthias Reitinger · committed by David Peter · parent 00b57b5 · Browse files · 6 files·+568 added−258 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+568 added−258 removed
- tests:+496 added−254 removed
- other:+72 added−4 removed
Provenance
- Commit
6f22957- Tree
c33f013- Author
Matthias Reitinger <reima@users.noreply.github.com>- Committer
David Peter <sharkdp@users.noreply.github.com>- Parent
00b57b5
6 files changed+568 added−258 removed
added:tests/testenv/mod.rs+169 added
1+use std;2+use std::env;3+use std::fs;4+use std::io;5+use std::io::Write;6+use std::path::{Path, PathBuf};7+use std::process;8+9+#[cfg(unix)]10+use std::os::unix;11+12+#[cfg(windows)]13+use std::os::windows;14+15+extern crate diff;16+extern crate tempdir;17+18+use self::tempdir::TempDir;19+20+/// Environment for the integration tests.21+pub struct TestEnv {22+ /// Temporary working directory.23+ temp_dir: TempDir,24+25+ /// Path to the *fd* executable.26+ fd_exe: PathBuf,27+}28+29+/// Create the working directory and the test files.30+fn create_working_directory() -> Result<TempDir, io::Error> {31+ let temp_dir = TempDir::new("fd-tests")?;32+33+ {34+ let root = temp_dir.path();35+36+ fs::create_dir_all(root.join("one/two/three"))?;37+38+ fs::File::create(root.join("a.foo"))?;39+ fs::File::create(root.join("one/b.foo"))?;40+ fs::File::create(root.join("one/two/c.foo"))?;41+ fs::File::create(root.join("one/two/C.Foo2"))?;42+ fs::File::create(root.join("one/two/three/d.foo"))?;43+ fs::create_dir(root.join("one/two/three/directory_foo"))?;44+ fs::File::create(root.join("ignored.foo"))?;45+ fs::File::create(root.join(".hidden.foo"))?;46+47+ #[cfg(unix)]48+ unix::fs::symlink(root.join("one/two"), root.join("symlink"))?;49+50+ #[cfg(windows)]51+ windows::fs::symlink_dir(root.join("one/two"), root.join("symlink"))?;52+53+ fs::File::create(root.join(".ignore"))?.write_all(b"ignored.foo")?;54+ }55+56+ Ok(temp_dir)57+}58+59+/// Find the *fd* executable.60+fn find_fd_exe() -> PathBuf {61+ // Tests exe is in target/debug/deps, the *fd* exe is in target/debug62+ let root = env::current_exe().expect("tests executable")63+ .parent().expect("tests executable directory")64+ .parent().expect("fd executable directory")65+ .to_path_buf();66+67+ let exe_name = if cfg!(windows) { "fd.exe" } else { "fd" };68+69+ root.join(exe_name)70+}71+72+/// Format an error message for when *fd* did not exit successfully.73+fn format_exit_error(args: &[&str], output: &process::Output) -> String {74+ format!(75+ "`fd {}` did not exit successfully.\nstdout:\n---\n{}---\nstderr:\n---\n{}---",76+ args.join(" "),77+ String::from_utf8_lossy(&output.stdout),78+ String::from_utf8_lossy(&output.stderr))79+}80+81+/// Format an error message for when the output of *fd* did not match the expected output.82+fn format_output_error(args: &[&str], expected: &str, actual: &str) -> String {83+ // Generate diff text.84+ let diff_text =85+ diff::lines(expected, actual)86+ .into_iter()87+ .map(|diff| {88+ match diff {89+ diff::Result::Left(l) => format!("-{}", l),90+ diff::Result::Both(l, _) => format!(" {}", l),91+ diff::Result::Right(r) => format!("+{}", r),92+ }93+ })94+ .collect::<Vec<_>>()95+ .join("\n");96+97+ format!(98+ concat!(99+ "`fd {}` did not produce the expected output.\n",100+ "Showing diff between expected and actual:\n{}\n"),101+ args.join(" "),102+ diff_text)103+}104+105+/// Normalize the output for comparison.106+fn normalize_output(s: &str, trim_left: bool) -> String {107+ // Split into lines and normalize separators.108+ let mut lines = s109+ .replace('\0', "NULL\n")110+ .lines()111+ .map(|line| {112+ let line = if trim_left { line.trim_left() } else { line };113+ line.replace('/', &std::path::MAIN_SEPARATOR.to_string())114+ })115+ .collect::<Vec<_>>();116+117+ // Sort ignoring case.118+ lines.sort_by_key(|s| s.to_lowercase());119+120+ lines.join("\n")121+}122+123+impl TestEnv {124+ pub fn new() -> TestEnv {125+ let temp_dir = create_working_directory().expect("working directory");126+ let fd_exe = find_fd_exe();127+128+ TestEnv {129+ temp_dir: temp_dir,130+ fd_exe: fd_exe,131+ }132+ }133+134+ /// Get the root directory for the tests.135+ pub fn root(&self) -> PathBuf {136+ self.temp_dir.path().to_path_buf()137+ }138+139+ /// Assert that calling *fd* with the specified arguments produces the expected output.140+ pub fn assert_output(&self, args: &[&str], expected: &str) {141+ self.assert_output_subdirectory(".", args, expected)142+ }143+144+ /// Assert that calling *fd* in the specified path under the root working directory,145+ /// and with the specified arguments produces the expected output.146+ pub fn assert_output_subdirectory<P: AsRef<Path>>(&self, path: P, args: &[&str], expected: &str) {147+ // Setup *fd* command.148+ let mut cmd = process::Command::new(&self.fd_exe);149+ cmd.current_dir(self.temp_dir.path().join(path));150+ cmd.args(args);151+152+ // Run *fd*.153+ let output = cmd.output().expect("fd output");154+155+ // Check for exit status.156+ if !output.status.success() {157+ panic!(format_exit_error(args, &output));158+ }159+160+ // Normalize both expected and actual output.161+ let expected = normalize_output(expected, true);162+ let actual = normalize_output(&String::from_utf8_lossy(&output.stdout), false);163+164+ // Compare actual output to expected output.165+ if expected != actual {166+ panic!(format_output_error(args, &expected, &actual));167+ }168+ }169+}deleted:tests/test.sh-254 removed
1-#!/bin/bash2-3-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"4-5-fd="${SCRIPT_DIR}/../target/debug/fd"6-7-MKTEMP_TEMPLATE="fd-tests.XXXXXXXXXX"8-9-# Stabilize sort10-export LC_ALL="C"11-export LC_CTYPE="UTF-8"12-13-export reset='\x1b[0m'14-export bold='\x1b[01m'15-export green='\x1b[32;01m'16-export red='\x1b[31;01m'17-18-set -eou pipefail19-20-suite() {21- echo22- echo -e "${bold}$1${reset}"23- echo24-}25-26-expect() {27- expected_output="$1"28- shift29-30- tmp_expected="$(mktemp -t "$MKTEMP_TEMPLATE")"31- tmp_output="$(mktemp -t "$MKTEMP_TEMPLATE")"32-33- echo "$expected_output" > "$tmp_expected"34-35- # Use python instead of sed here (for this to work on macOS)36- "$fd" "$@" | python -c 'import sys; sys.stdout.write(sys.stdin.read().replace("\0", "NULL\n"))' | sort -f > "$tmp_output"37-38- echo -ne " ${bold}▶${reset} Testing 'fd $*' ... "39-40- if diff -q "$tmp_expected" "$tmp_output" > /dev/null; then41- echo -e "${green}✓ okay${reset}"42-43- rm -f "$tmp_expected" "$tmp_output"44- else45- echo -e "${red}❌FAILED${reset}"46-47- echo -ne "\nShowing diff between ${red}expected${reset} and "48- echo -e "${green}actual${reset} output:\n"49-50- diff -C3 --label expected --label actual \51- "$tmp_expected" "$tmp_output" || true52-53- rm -f "$tmp_expected" "$tmp_output"54-55- exit 156- fi57-}58-59-root=$(mktemp -d -t "$MKTEMP_TEMPLATE")60-61-cd "$root"62-63-# Setup test environment64-65-mkdir -p one/two/three66-67-touch a.foo68-touch one/b.foo69-touch one/two/c.foo70-touch one/two/C.Foo271-touch one/two/three/d.foo72-mkdir one/two/three/directory_foo73-touch ignored.foo74-touch .hidden.foo75-ln -s one/two symlink76-77-echo "ignored.foo" > .ignore78-79-80-# Run the tests81-82-suite "Simple tests"83-expect "a.foo" a.foo84-expect "one/b.foo" b.foo85-expect "one/two/three/d.foo" d.foo86-expect "a.foo87-one/b.foo88-one/two/c.foo89-one/two/C.Foo290-one/two/three/d.foo91-one/two/three/directory_foo" foo92-expect "a.foo93-one94-one/b.foo95-one/two96-one/two/c.foo97-one/two/C.Foo298-one/two/three99-one/two/three/d.foo100-one/two/three/directory_foo101-symlink" # run 'fd' without arguments102-103-suite "Explicit root path"104-expect "one/b.foo105-one/two/c.foo106-one/two/C.Foo2107-one/two/three/d.foo108-one/two/three/directory_foo" foo one109-expect "one/two/three/d.foo110-one/two/three/directory_foo" foo one/two/three111-(112-cd one/two113-expect "../../a.foo114-../b.foo115-c.foo116-C.Foo2117-three/d.foo118-three/directory_foo" foo ../../119-)120-121-suite "Regex searches"122-expect "a.foo123-one/b.foo124-one/two/c.foo125-one/two/C.Foo2" '[a-c].foo'126-expect "a.foo127-one/b.foo128-one/two/c.foo" --case-sensitive '[a-c].foo'129-130-131-132-suite "Smart case"133-expect "one/two/c.foo134-one/two/C.Foo2" c.foo135-expect "one/two/C.Foo2" C.Foo136-expect "one/two/C.Foo2" Foo137-138-139-suite "Case-sensitivity (--case-sensitive)"140-expect "one/two/c.foo" --case-sensitive c.foo141-expect "one/two/C.Foo2" --case-sensitive C.Foo142-143-144-suite "Full path search (--full-path)"145-expect "one/two/three/d.foo146-one/two/three/directory_foo" --full-path 'three.*foo'147-expect "a.foo" --full-path '^a\.foo$'148-149-150-suite "Hidden files (--hidden)"151-expect ".hidden.foo152-a.foo153-one/b.foo154-one/two/c.foo155-one/two/C.Foo2156-one/two/three/d.foo157-one/two/three/directory_foo" --hidden foo158-159-160-suite "Ignored files (--no-ignore)"161-expect "a.foo162-ignored.foo163-one/b.foo164-one/two/c.foo165-one/two/C.Foo2166-one/two/three/d.foo167-one/two/three/directory_foo" --no-ignore foo168-169-expect ".hidden.foo170-a.foo171-ignored.foo172-one/b.foo173-one/two/c.foo174-one/two/C.Foo2175-one/two/three/d.foo176-one/two/three/directory_foo" --hidden --no-ignore foo177-178-179-suite "Symlinks (--follow)"180-expect "one/two/c.foo181-one/two/C.Foo2182-symlink/c.foo183-symlink/C.Foo2" --follow c.foo184-185-suite "Null separator (--print0)"186-expect "a.fooNULL187-one/b.fooNULL188-one/two/C.Foo2NULL189-one/two/c.fooNULL190-one/two/three/d.fooNULL191-one/two/three/directory_fooNULL" --print0 foo192-193-194-suite "Maximum depth (--max-depth)"195-expect "a.foo196-one197-one/b.foo198-one/two199-one/two/c.foo200-one/two/C.Foo2201-one/two/three202-symlink" --max-depth 3203-expect "a.foo204-one205-one/b.foo206-one/two207-symlink" --max-depth 2208-expect "a.foo209-one210-symlink" --max-depth 1211-212-abs_path=$(python -c "import os; print(os.path.realpath('$root'))")213-214-suite "Absolute paths (--absolute-path)"215-expect "$abs_path/a.foo216-$abs_path/one/b.foo217-$abs_path/one/two/c.foo218-$abs_path/one/two/C.Foo2219-$abs_path/one/two/three/d.foo220-$abs_path/one/two/three/directory_foo" --absolute-path foo221-expect "$abs_path/a.foo222-$abs_path/one/b.foo223-$abs_path/one/two/c.foo224-$abs_path/one/two/C.Foo2225-$abs_path/one/two/three/d.foo226-$abs_path/one/two/three/directory_foo" foo "$abs_path"227-228-229-suite "File type filter (--type)"230-expect "a.foo231-one/b.foo232-one/two/c.foo233-one/two/C.Foo2234-one/two/three/d.foo" --type f235-expect "one236-one/two237-one/two/three238-one/two/three/directory_foo" --type d239-expect "symlink" --type s240-241-242-suite "File extension (--extension)"243-expect "a.foo244-one/b.foo245-one/two/c.foo246-one/two/three/d.foo" --extension foo247-expect "a.foo248-one/b.foo249-one/two/c.foo250-one/two/three/d.foo" --extension .foo251-expect "one/two/C.Foo2" --extension foo2252-253-# All done254-echoadded:tests/tests.rs+327 added
1+//! Integration tests for the CLI interface of fd.2+3+#![allow(dead_code, unused_imports)]4+5+mod testenv;6+7+use testenv::TestEnv;8+9+/// Simple tests10+#[test]11+fn test_simple() {12+ let te = TestEnv::new();13+14+ te.assert_output(&["a.foo"], "a.foo");15+ te.assert_output(&["b.foo"], "one/b.foo");16+ te.assert_output(&["d.foo"], "one/two/three/d.foo");17+18+ te.assert_output(19+ &["foo"],20+ "a.foo21+ one/b.foo22+ one/two/c.foo23+ one/two/C.Foo224+ one/two/three/d.foo25+ one/two/three/directory_foo");26+27+ te.assert_output(28+ &[],29+ "a.foo30+ one31+ one/b.foo32+ one/two33+ one/two/c.foo34+ one/two/C.Foo235+ one/two/three36+ one/two/three/d.foo37+ one/two/three/directory_foo38+ symlink");39+}40+41+/// Explicit root path42+// TODO: Fails on windows43+#[cfg_attr(windows, ignore)]44+#[test]45+fn test_explicit_root_path() {46+ let te = TestEnv::new();47+48+ te.assert_output(49+ &["foo", "one"],50+ "one/b.foo51+ one/two/c.foo52+ one/two/C.Foo253+ one/two/three/d.foo54+ one/two/three/directory_foo");55+56+ te.assert_output(57+ &["foo", "one/two/three"],58+ "one/two/three/d.foo59+ one/two/three/directory_foo");60+61+ te.assert_output_subdirectory(62+ "one/two",63+ &["foo", "../../"],64+ "../../a.foo65+ ../b.foo66+ c.foo67+ C.Foo268+ three/d.foo69+ three/directory_foo");70+}71+72+/// Regex searches73+#[test]74+fn test_regex_searches() {75+ let te = TestEnv::new();76+77+ te.assert_output(78+ &["[a-c].foo"],79+ "a.foo80+ one/b.foo81+ one/two/c.foo82+ one/two/C.Foo2");83+84+ te.assert_output(85+ &["--case-sensitive", "[a-c].foo"],86+ "a.foo87+ one/b.foo88+ one/two/c.foo");89+}90+91+/// Smart case92+#[test]93+fn test_smart_case() {94+ let te = TestEnv::new();95+96+ te.assert_output(97+ &["c.foo"],98+ "one/two/c.foo99+ one/two/C.Foo2");100+101+ te.assert_output(102+ &["C.Foo"],103+ "one/two/C.Foo2");104+105+ te.assert_output(106+ &["Foo"],107+ "one/two/C.Foo2");108+}109+110+/// Case sensitivity (--case-sensitive)111+#[test]112+fn test_case_sensitive() {113+ let te = TestEnv::new();114+115+ te.assert_output(116+ &["--case-sensitive", "c.foo"],117+ "one/two/c.foo");118+119+ te.assert_output(120+ &["--case-sensitive", "C.Foo"],121+ "one/two/C.Foo2");122+}123+124+/// Full path search (--full-path)125+#[test]126+fn test_full_path() {127+ let te = TestEnv::new();128+129+ te.assert_output(130+ &["--full-path", "three.*foo"],131+ "one/two/three/d.foo132+ one/two/three/directory_foo");133+134+ te.assert_output(135+ &["--full-path", "^a\\.foo"],136+ "a.foo");137+}138+139+/// Hidden files (--hidden)140+#[test]141+fn test_hidden() {142+ let te = TestEnv::new();143+144+ te.assert_output(145+ &["--hidden", "foo"],146+ ".hidden.foo147+ a.foo148+ one/b.foo149+ one/two/c.foo150+ one/two/C.Foo2151+ one/two/three/d.foo152+ one/two/three/directory_foo");153+}154+155+/// Ignored files (--no-ignore)156+#[test]157+fn test_no_ignore() {158+ let te = TestEnv::new();159+160+ te.assert_output(161+ &["--no-ignore", "foo"],162+ "a.foo163+ ignored.foo164+ one/b.foo165+ one/two/c.foo166+ one/two/C.Foo2167+ one/two/three/d.foo168+ one/two/three/directory_foo");169+170+ te.assert_output(171+ &["--hidden", "--no-ignore", "foo"],172+ ".hidden.foo173+ a.foo174+ ignored.foo175+ one/b.foo176+ one/two/c.foo177+ one/two/C.Foo2178+ one/two/three/d.foo179+ one/two/three/directory_foo");180+}181+182+/// Symlinks (--follow)183+#[test]184+fn test_follow() {185+ let te = TestEnv::new();186+187+ te.assert_output(188+ &["--follow", "c.foo"],189+ "one/two/c.foo190+ one/two/C.Foo2191+ symlink/c.foo192+ symlink/C.Foo2");193+}194+195+/// Null separator (--print0)196+#[test]197+fn test_print0() {198+ let te = TestEnv::new();199+200+ te.assert_output(201+ &["--print0", "foo"],202+ "a.fooNULL203+ one/b.fooNULL204+ one/two/C.Foo2NULL205+ one/two/c.fooNULL206+ one/two/three/d.fooNULL207+ one/two/three/directory_fooNULL");208+}209+210+/// Maximum depth (--max-depth)211+#[test]212+fn test_max_depth() {213+ let te = TestEnv::new();214+215+ te.assert_output(216+ &["--max-depth", "3"],217+ "a.foo218+ one219+ one/b.foo220+ one/two221+ one/two/c.foo222+ one/two/C.Foo2223+ one/two/three224+ symlink");225+226+ te.assert_output(227+ &["--max-depth", "2"],228+ "a.foo229+ one230+ one/b.foo231+ one/two232+ symlink");233+234+ te.assert_output(235+ &["--max-depth", "1"],236+ "a.foo237+ one238+ symlink");239+}240+241+/// Absolute paths (--absolute-path)242+// TODO: fails on windows243+#[cfg_attr(windows, ignore)]244+#[test]245+fn test_absolute_path() {246+ let te = TestEnv::new();247+248+ let abs_path = te.root()249+ .canonicalize().expect("absolute path")250+ .to_str().expect("string")251+ .to_string();252+253+ te.assert_output(254+ &["--absolute-path", "foo"],255+ &format!(256+ "{abs_path}/a.foo257+ {abs_path}/one/b.foo258+ {abs_path}/one/two/c.foo259+ {abs_path}/one/two/C.Foo2260+ {abs_path}/one/two/three/d.foo261+ {abs_path}/one/two/three/directory_foo",262+ abs_path=abs_path263+ )264+ );265+266+ te.assert_output(267+ &["foo", &abs_path],268+ &format!(269+ "{abs_path}/a.foo270+ {abs_path}/one/b.foo271+ {abs_path}/one/two/c.foo272+ {abs_path}/one/two/C.Foo2273+ {abs_path}/one/two/three/d.foo274+ {abs_path}/one/two/three/directory_foo",275+ abs_path=abs_path276+ )277+ );278+}279+280+/// File type filter (--type)281+#[test]282+fn test_type() {283+ let te = TestEnv::new();284+285+ te.assert_output(286+ &["--type", "f"],287+ "a.foo288+ one/b.foo289+ one/two/c.foo290+ one/two/C.Foo2291+ one/two/three/d.foo");292+293+ te.assert_output(294+ &["--type", "d"],295+ "one296+ one/two297+ one/two/three298+ one/two/three/directory_foo");299+300+ te.assert_output(301+ &["--type", "s"],302+ "symlink");303+}304+305+/// File extension (--extension)306+#[test]307+fn test_extension() {308+ let te = TestEnv::new();309+310+ te.assert_output(311+ &["--extension", "foo"],312+ "a.foo313+ one/b.foo314+ one/two/c.foo315+ one/two/three/d.foo");316+317+ te.assert_output(318+ &["--extension", ".foo"],319+ "a.foo320+ one/b.foo321+ one/two/c.foo322+ one/two/three/d.foo");323+324+ te.assert_output(325+ &["--extension", "foo2"],326+ "one/two/C.Foo2");327+}modified:.travis.yml-3 removed
31 unmodified lines3233343536373836373831 unmodified lines - os: linux rust: 1.16.0 env: TARGET=x86_64-unknown-linux-musl
after_success: - bash tests/test.sh
notifications: email: on_success: nevermodified:Cargo.lock+67 added
3 unmodified lines4 dependencies = [5 "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",6 "atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",7 "clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)",8+ "diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",9 "ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",10 "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",11 "regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",12+ "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",13 ]14 15 [[package]]16 name = "aho-corasick"19 unmodified lines36 ]37 38 [[package]]39 name = "bitflags"40+version = "0.7.0"41+source = "registry+https://github.com/rust-lang/crates.io-index"42+43+[[package]]44+name = "bitflags"45 version = "0.9.1"46 source = "registry+https://github.com/rust-lang/crates.io-index"47 48 [[package]]12 unmodified lines61 "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",62 ]63 64 [[package]]65+name = "conv"66+version = "0.3.3"67+source = "registry+https://github.com/rust-lang/crates.io-index"68+dependencies = [69+ "custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",70+]71+72+[[package]]73 name = "crossbeam"74 version = "0.2.10"75 source = "registry+https://github.com/rust-lang/crates.io-index"76 77 [[package]]78+name = "custom_derive"79+version = "0.1.7"80+source = "registry+https://github.com/rust-lang/crates.io-index"81+82+[[package]]83+name = "diff"84+version = "0.1.10"85+source = "registry+https://github.com/rust-lang/crates.io-index"86+87+[[package]]88 name = "fnv"89 version = "1.0.5"90 source = "registry+https://github.com/rust-lang/crates.io-index"91 48 unmodified lines140 version = "0.3.8"141 source = "registry+https://github.com/rust-lang/crates.io-index"142 143 [[package]]144+name = "magenta"145+version = "0.1.1"146+source = "registry+https://github.com/rust-lang/crates.io-index"147+dependencies = [148+ "conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",149+ "magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",150+]151+152+[[package]]153+name = "magenta-sys"154+version = "0.1.1"155+source = "registry+https://github.com/rust-lang/crates.io-index"156+dependencies = [157+ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",158+]159+160+[[package]]161 name = "memchr"162 version = "1.0.1"163 source = "registry+https://github.com/rust-lang/crates.io-index"164 dependencies = [8 unmodified lines173 "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",174 ]175 176 [[package]]177+name = "rand"178+version = "0.3.16"179+source = "registry+https://github.com/rust-lang/crates.io-index"180+dependencies = [181+ "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",182+ "magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",183+]184+185+[[package]]186 name = "regex"187 version = "0.2.2"188 source = "registry+https://github.com/rust-lang/crates.io-index"189 dependencies = [23 unmodified lines213 version = "0.6.0"214 source = "registry+https://github.com/rust-lang/crates.io-index"215 216 [[package]]217+name = "tempdir"218+version = "0.3.5"219+source = "registry+https://github.com/rust-lang/crates.io-index"220+dependencies = [221+ "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",222+]223+224+[[package]]225 name = "term_size"226 version = "0.3.0"227 source = "registry+https://github.com/rust-lang/crates.io-index"228 dependencies = [76 unmodified lines305 [metadata]306 "checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699"307 "checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6"308 "checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159"309+"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"310 "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"311 "checksum clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2267a8fdd4dce6956ba6649e130f62fb279026e5e84b92aa939ac8f85ce3f9f0"312+"checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299"313 "checksum crossbeam 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0c5ea215664ca264da8a9d9c3be80d2eaf30923c259d03e870388eb927508f97"314+"checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9"315+"checksum diff 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0a515461b6c8c08419850ced27bc29e86166dcdcde8fbe76f8b1f0589bb49472"316 "checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344"317 "checksum globset 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "feeb1b6840809ef5efcf7a4a990bc4e1b7ee3df8cf9e2379a75aeb2ba42ac9c3"318 "checksum ignore 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b3fcaf2365eb14b28ec7603c98c06cc531f19de9eb283d89a3dff8417c8c99f5"319 "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"320 "checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"321 "checksum libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)" = "2370ca07ec338939e356443dac2296f581453c35fe1e3a3ed06023c49435f915"322 "checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"323+"checksum magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf0336886480e671965f794bc9b6fce88503563013d1bfb7a502c81fe3ac527"324+"checksum magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40d014c7011ac470ae28e2f76a02bfea4a8480f73e701353b49ad7a8d75f4699"325 "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"326 "checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584"327+"checksum rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "eb250fd207a4729c976794d03db689c9be1d634ab5a1c9da9492a13d8fecbcdf"328 "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"329 "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"330 "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7"331 "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"332+"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6"333 "checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209"334 "checksum textwrap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f728584ea33b0ad19318e20557cb0a39097751dbb07171419673502f848c7af6"335 "checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14"336 "checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946"8 unmodified linesmodified:Cargo.toml+5 added-1 removed
27 unmodified lines2829303132323334353627 unmodified linesignore = "0.2"num_cpus = "1.6.2"
[build-dependencies]clap = "2.26.0"No newline at end of fileclap = "2.26.0"
[dev-dependencies]diff = "0.1"tempdir = "0.3"No newline at end of file