Skip to content

Commit

Permalink
Added check for binary file correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
WGUNDERWOOD committed Sep 3, 2024
1 parent 5197c7c commit 103b1a6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 15 additions & 0 deletions extra/binary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
echo "Testing binary"
DIR="$(mktemp -d)"
cp -r ../tests/* "$DIR"
cargo build --release

# run tex-fmt
../target/release/tex-fmt "$DIR/source"/* "$DIR/target"/*

# tex-fmt agrees with target files
for file in ../tests/source/*; do
f=$(basename "$file")
diff ../"tests/target/$f" "$DIR/source/$f" | diff-so-fancy
diff ../"tests/target/$f" "$DIR/target/$f" | diff-so-fancy
done
5 changes: 4 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
default: test doc clippy format shellcheck

all: default prof perf logo latex
all: default prof perf binary logo latex

alias b := build
alias d := doc
Expand Down Expand Up @@ -36,6 +36,9 @@ perf:
prof:
@cd extra && bash prof.sh

binary:
@cd extra && bash binary.sh

upgrade:
@cargo upgrade && cargo update

Expand Down

0 comments on commit 103b1a6

Please sign in to comment.