mirror of
https://github.com/sharkdp/bat.git
synced 2026-02-08 00:32:08 +00:00
Merge pull request #3476 from sharkdp/docker_syntax_fix
Revert "Bump assets/syntaxes/02_Extra/Docker from `0f6b7bc` to `c001fb2` (#3024)"
This commit is contained in:
24
.github/workflows/CICD.yml
vendored
24
.github/workflows/CICD.yml
vendored
@@ -161,19 +161,19 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
job:
|
||||
- { target: aarch64-unknown-linux-musl , os: ubuntu-latest, dpkg_arch: arm64, use-cross: true }
|
||||
- { target: aarch64-unknown-linux-gnu , os: ubuntu-latest, dpkg_arch: arm64, use-cross: true }
|
||||
- { target: arm-unknown-linux-gnueabihf , os: ubuntu-latest, dpkg_arch: armhf, use-cross: true }
|
||||
- { target: arm-unknown-linux-musleabihf, os: ubuntu-latest, dpkg_arch: musl-linux-armhf, use-cross: true }
|
||||
- { target: i686-pc-windows-msvc , os: windows-2025, }
|
||||
- { target: i686-unknown-linux-gnu , os: ubuntu-latest, dpkg_arch: i686, use-cross: true }
|
||||
- { target: i686-unknown-linux-musl , os: ubuntu-latest, dpkg_arch: musl-linux-i686, use-cross: true }
|
||||
- { target: x86_64-apple-darwin , os: macos-13, }
|
||||
- { target: aarch64-apple-darwin , os: macos-14, }
|
||||
- { target: x86_64-pc-windows-msvc , os: windows-2025, }
|
||||
- { target: aarch64-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: arm64, use-cross: true }
|
||||
- { target: aarch64-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: arm64, use-cross: true }
|
||||
- { target: arm-unknown-linux-gnueabihf , os: ubuntu-latest , dpkg_arch: armhf, use-cross: true }
|
||||
- { target: arm-unknown-linux-musleabihf, os: ubuntu-latest , dpkg_arch: musl-linux-armhf, use-cross: true }
|
||||
- { target: i686-pc-windows-msvc , os: windows-2025 , }
|
||||
- { target: i686-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: i686, use-cross: true }
|
||||
- { target: i686-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: musl-linux-i686, use-cross: true }
|
||||
- { target: x86_64-apple-darwin , os: macos-15-intel, }
|
||||
- { target: aarch64-apple-darwin , os: macos-latest , }
|
||||
- { target: x86_64-pc-windows-msvc , os: windows-2025 , }
|
||||
- { target: aarch64-pc-windows-msvc , os: windows-11-arm, }
|
||||
- { target: x86_64-unknown-linux-gnu , os: ubuntu-latest, dpkg_arch: amd64, use-cross: true }
|
||||
- { target: x86_64-unknown-linux-musl , os: ubuntu-latest, dpkg_arch: musl-linux-amd64, use-cross: true }
|
||||
- { target: x86_64-unknown-linux-gnu , os: ubuntu-latest , dpkg_arch: amd64, use-cross: true }
|
||||
- { target: x86_64-unknown-linux-musl , os: ubuntu-latest , dpkg_arch: musl-linux-amd64, use-cross: true }
|
||||
env:
|
||||
BUILD_CMD: cargo
|
||||
steps:
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
- Fix hang when using `--list-themes` with an explicit pager, see #3457 (@abhinavcool42)
|
||||
- Fix negative values of N not being parsed in <N:M> line ranges without `=` flag value separator, see #3442 (@lmmx)
|
||||
- Fix broken Docker syntax preventing use of custom assets, see #3476 (@keith-hall)
|
||||
|
||||
## Other
|
||||
- Improve README documentation on pager options passed to less, see #3443 (@injust)
|
||||
|
||||
BIN
assets/syntaxes.bin
vendored
BIN
assets/syntaxes.bin
vendored
Binary file not shown.
2
assets/syntaxes/02_Extra/Docker
vendored
2
assets/syntaxes/02_Extra/Docker
vendored
Submodule assets/syntaxes/02_Extra/Docker updated: c001fb2805...0f6b7bc87a
@@ -1599,7 +1599,7 @@ Clearing metadata file ... okay",
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn cache_build() {
|
||||
fn cache_build_blank() {
|
||||
let src_dir = "cache_source";
|
||||
let tmp_dir = tempdir().expect("can create temporary directory");
|
||||
let tmp_themes_path = tmp_dir.path().join("themes.bin");
|
||||
@@ -1642,6 +1642,50 @@ Writing metadata to folder .* ... okay",
|
||||
assert!(tmp_metadata_path.exists());
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
#[test]
|
||||
fn cache_build() {
|
||||
let src_dir = "cache_source";
|
||||
let tmp_dir = tempdir().expect("can create temporary directory");
|
||||
let tmp_themes_path = tmp_dir.path().join("themes.bin");
|
||||
let tmp_syntaxes_path = tmp_dir.path().join("syntaxes.bin");
|
||||
let tmp_acknowledgements_path = tmp_dir.path().join("acknowledgements.bin");
|
||||
let tmp_metadata_path = tmp_dir.path().join("metadata.yaml");
|
||||
|
||||
// Build the cache
|
||||
// Include the BAT_CONFIG_PATH and BAT_THEME environment variables to ensure that
|
||||
// options loaded from a config or the environment are not inserted
|
||||
// before the cache subcommand, which would break it.
|
||||
bat_with_config()
|
||||
.current_dir(Path::new(EXAMPLES_DIR).join(src_dir))
|
||||
.env("BAT_CONFIG_PATH", "bat.conf")
|
||||
.env("BAT_THEME", "1337")
|
||||
.arg("cache")
|
||||
.arg("--build")
|
||||
// removed --blank
|
||||
.arg("--source")
|
||||
.arg(".")
|
||||
.arg("--target")
|
||||
.arg(tmp_dir.path().to_str().unwrap())
|
||||
.arg("--acknowledgements")
|
||||
.assert()
|
||||
.success()
|
||||
.stdout(
|
||||
predicate::str::is_match(
|
||||
"Writing theme set to .*/themes.bin ... okay\nWriting syntax set to .*/syntaxes.bin ... okay\nWriting acknowledgements to .*/acknowledgements.bin ... okay\nWriting metadata to folder .* ... okay",
|
||||
)
|
||||
.unwrap(),
|
||||
)
|
||||
.stdout(predicate::str::contains("Some referenced contexts could not be found!").not())
|
||||
;
|
||||
|
||||
// Now we expect the files to exist. If they exist, we assume contents are correct
|
||||
assert!(tmp_themes_path.exists());
|
||||
assert!(tmp_syntaxes_path.exists());
|
||||
assert!(tmp_acknowledgements_path.exists());
|
||||
assert!(tmp_metadata_path.exists());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn utf16() {
|
||||
// The output will be converted to UTF-8 with the leading UTF-16
|
||||
|
||||
Reference in New Issue
Block a user