mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-03 12:18:49 +01:00
parent
16874ab016
commit
86c1777205
@ -7,7 +7,7 @@ license = "MIT/Apache-2.0"
|
|||||||
name = "bat"
|
name = "bat"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/sharkdp/bat"
|
repository = "https://github.com/sharkdp/bat"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
exclude = [
|
exclude = [
|
||||||
"assets/syntaxes/*",
|
"assets/syntaxes/*",
|
||||||
"assets/themes/*",
|
"assets/themes/*",
|
||||||
|
@ -11,7 +11,7 @@ pub struct BatTester {
|
|||||||
impl BatTester {
|
impl BatTester {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
modify_sample_file();
|
modify_sample_file();
|
||||||
// Lifted from fd :)
|
|
||||||
let root = env::current_exe()
|
let root = env::current_exe()
|
||||||
.expect("tests executable")
|
.expect("tests executable")
|
||||||
.parent()
|
.parent()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
mod tester;
|
mod tester;
|
||||||
|
|
||||||
|
use std::process::{Command, Stdio};
|
||||||
use tester::BatTester;
|
use tester::BatTester;
|
||||||
|
|
||||||
static STYLES: &'static [&'static str] = &[
|
static STYLES: &'static [&'static str] = &[
|
||||||
@ -24,6 +25,17 @@ static STYLES: &'static [&'static str] = &[
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_snapshots() {
|
fn test_snapshots() {
|
||||||
|
let status = Command::new("git")
|
||||||
|
.arg("rev-parse")
|
||||||
|
.stdout(Stdio::null())
|
||||||
|
.stderr(Stdio::null())
|
||||||
|
.status();
|
||||||
|
|
||||||
|
if !status.map(|s| s.success()).unwrap_or(false) {
|
||||||
|
// Git not available or not a git repository. Skipping snapshot test.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let bat_tester = BatTester::new();
|
let bat_tester = BatTester::new();
|
||||||
|
|
||||||
for style in STYLES {
|
for style in STYLES {
|
||||||
|
Loading…
Reference in New Issue
Block a user