Skip to content
Snippets Groups Projects
Commit 45b76ea7 authored by Hoang Nguyen's avatar Hoang Nguyen :turtle: Committed by omni
Browse files

testing/typstyle: new aport

parent 3fe4e58d
No related branches found
No related tags found
2 merge requests!79570community/firefox-esr: upgrade to 128.7.0,!75293testing/typstyle: new aport
Pipeline #289948 skipped
maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=typstyle
pkgver=0.12.14
pkgrel=0
pkgdesc="Beautiful and reliable typst code formatter"
url="https://enter-tainer.github.io/typstyle/"
arch="all"
license="Apache-2.0"
makedepends="cargo cargo-auditable openssl-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/Enter-tainer/typstyle/archive/refs/tags/v$pkgver.tar.gz
skip-sensitive-test.patch
"
export OPENSSL_NO_VENDOR=1
export PKG_CONFIG_ALL_DYNAMIC=1
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo auditable build --frozen --release --bin typstyle
}
check() {
# Remove the default `consistency` feature in typstyle-tests crate.
# The feature enables running repo-e2e tests, which easily panic on our builder.
cargo test --frozen --workspace --no-default-features
}
package() {
install -Dm755 target/release/typstyle -t "$pkgdir"/usr/bin/
}
sha512sums="
76ed0780e03fcb4b22774fe01ae3d8ba6e47e0330d8c6635ac0d94acf507b199f110581d85e443738b8ffc678554e02deaf5be1bc6f7ad3775e6c23212e24dc9 typstyle-0.12.14.tar.gz
466fedd6eef1fc6bf3408a4836e7271b797131761d046096da94f986c00e897bfcf14416758dd6469a08dbf2884e28a4467b929554422b866317b56d235ee0ce skip-sensitive-test.patch
"
The test is sensitive about the order of formatted files listed in the snapshot,
compared to the actual stdout output when it is run.
diff --git a/crates/typstyle/tests/test_format_all.rs b/crates/typstyle/tests/test_format_all.rs
index 1b87b06..c069f47 100644
--- a/crates/typstyle/tests/test_format_all.rs
+++ b/crates/typstyle/tests/test_format_all.rs
@@ -72,6 +72,7 @@ fn test_all_2() {
}
#[test]
+#[ignore]
fn test_all_0_check() {
let mut space = Workspace::new();
space.write_tracked("a.typ", "#let a = 0");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment