Skip to content

Commit cf9c6be

Browse files
committed
Constantify serve_{dir,file} test file paths and content
Mainly a QoL change for downstream packagers, but might also prove useful for e.g. future refactors. Currently we have to patch all those file paths to something exsistent, due to test-files/ not being included in crates.io releases, while the Debian Rust Team pulls Rust crate source from there: https://salsa.debian.org/rust-team/debcargo-conf/-/blob/ee75c0c18a/src/tower-http/debian/patches/missing-testdata With these constants we could change only them. Test files are also changed to the same content, so one constant fits all.
1 parent d0c522b commit cf9c6be

9 files changed

+185
-159
lines changed

test-files/missing_precompressed.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Test file!
1+
Test file

test-files/only_gzipped.txt.gz

-10 Bytes
Binary file not shown.

test-files/precompressed.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"This is a test file!"
1+
Test file

test-files/precompressed.txt.br

-12 Bytes
Binary file not shown.

test-files/precompressed.txt.gz

-20 Bytes
Binary file not shown.

test-files/precompressed.txt.zst

-13 Bytes
Binary file not shown.

test-files/precompressed.txt.zz

-5 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)