mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-23 22:19:08 +01:00
Revert "Add cycle detection integration tests"
This reverts commit ec60d84265
.
This commit is contained in:
parent
a6810e3353
commit
bd2e9917da
0
tests/examples/cycle.txt
vendored
0
tests/examples/cycle.txt
vendored
@ -1,14 +1,11 @@
|
||||
use assert_cmd::assert::OutputAssertExt;
|
||||
use assert_cmd::cargo::CommandCargoExt;
|
||||
use assert_cmd::Command;
|
||||
use predicates::{prelude::predicate, str::PredicateStrExt};
|
||||
use std::fs::File;
|
||||
use std::path::Path;
|
||||
use std::process::{Command, Stdio};
|
||||
use std::str::from_utf8;
|
||||
|
||||
const EXAMPLES_DIR: &str = "tests/examples";
|
||||
|
||||
fn bat_as_std() -> Command {
|
||||
fn bat_with_config() -> Command {
|
||||
let mut cmd = Command::cargo_bin("bat").unwrap();
|
||||
cmd.current_dir("tests/examples");
|
||||
cmd.env_remove("PAGER");
|
||||
@ -20,11 +17,7 @@ fn bat_as_std() -> Command {
|
||||
cmd
|
||||
}
|
||||
|
||||
fn bat_with_config() -> assert_cmd::Command {
|
||||
assert_cmd::Command::from_std(bat_as_std())
|
||||
}
|
||||
|
||||
fn bat() -> assert_cmd::Command {
|
||||
fn bat() -> Command {
|
||||
let mut cmd = bat_with_config();
|
||||
cmd.arg("--no-config");
|
||||
cmd
|
||||
@ -196,30 +189,6 @@ fn line_range_multiple() {
|
||||
.stdout("line 1\nline 2\nline 4\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn basic_io_cycle() {
|
||||
let file_out = Stdio::from(File::open("tests/examples/cycle.txt").unwrap());
|
||||
bat_as_std()
|
||||
.arg("test.txt")
|
||||
.arg("cycle.txt")
|
||||
.stdout(file_out)
|
||||
.assert()
|
||||
.failure();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stdin_to_stdout_cycle() {
|
||||
let file_out = Stdio::from(File::open("tests/examples/cycle.txt").unwrap());
|
||||
let file_in = Stdio::from(File::open("tests/examples/cycle.txt").unwrap());
|
||||
bat_as_std()
|
||||
.stdin(file_in)
|
||||
.arg("test.txt")
|
||||
.arg("-")
|
||||
.stdout(file_out)
|
||||
.assert()
|
||||
.failure();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn tabs_numbers() {
|
||||
bat()
|
||||
|
Loading…
Reference in New Issue
Block a user