mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-01 19:02:22 +01:00
Credit syntax definition and theme authors with new --acknowledgements
option (#1971)
The text that is printed is generated when building assets, by analyzing LICENSE and NOTICE files that comes with syntaxes and themes. We take this opportunity to also add a NOTICE file as defined by Apache License 2.0.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use assert_cmd::cargo::CommandCargoExt;
|
||||
use predicates::boolean::PredicateBooleanExt;
|
||||
use predicates::{prelude::predicate, str::PredicateStrExt};
|
||||
use serial_test::serial;
|
||||
use std::path::Path;
|
||||
@@ -1275,3 +1276,39 @@ fn ignored_suffix_arg() {
|
||||
.stdout("\u{1b}[38;5;231m{\"test\": \"value\"}\u{1b}[0m")
|
||||
.stderr("");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn acknowledgements() {
|
||||
bat()
|
||||
.arg("--acknowledgements")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(
|
||||
// Just some sanity checking that avoids names of persons, except our own Keith Hall :)
|
||||
predicate::str::contains(
|
||||
"Copyright (c) 2018-2021 bat-developers (https://github.com/sharkdp/bat).",
|
||||
)
|
||||
.and(predicate::str::contains(
|
||||
"Copyright (c) 2012-2020 The Sublime CMake authors",
|
||||
))
|
||||
.and(predicate::str::contains(
|
||||
"Copyright 2014-2015 SaltStack Team",
|
||||
))
|
||||
.and(predicate::str::contains(
|
||||
"Copyright (c) 2013-present Dracula Theme",
|
||||
))
|
||||
.and(predicate::str::contains(
|
||||
"## syntaxes/01_Packages/Rust/LICENSE.txt",
|
||||
))
|
||||
.and(predicate::str::contains(
|
||||
"## syntaxes/02_Extra/http-request-response/LICENSE",
|
||||
))
|
||||
.and(predicate::str::contains(
|
||||
"## themes/dracula-sublime/LICENSE",
|
||||
))
|
||||
.and(predicate::str::contains("Copyright (c) 2017 b123400"))
|
||||
.and(predicate::str::contains("Copyright (c) 2021 Keith Hall"))
|
||||
.and(predicate::str::contains("Copyright 2014 Clams")),
|
||||
)
|
||||
.stderr("");
|
||||
}
|
||||
|
Reference in New Issue
Block a user