Skip to content

Commit 09b1c14

Browse files
authored
fix(tests/bundle_env_overrides): make more robust (#1316)
2 parents e8dd681 + 76e8a39 commit 09b1c14

6 files changed

Lines changed: 15 additions & 29 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ members = [
5959
"crates/xdv",
6060
"crates/xetex_format",
6161
"crates/xetex_layout",
62-
"tests/bundle_env_overrides_test",
6362
]
6463

6564
[workspace.lints.rust]

tests/bundle_env_overrides.rs

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,18 @@ fn test_bundle_locked() {
5858
fn test_bundle_prefix() {
5959
let url_prefixed = run_test_program(
6060
PRE_FORMAT_VERSION,
61-
&[("TECTONIC_BUNDLE_PREFIX", TEST_BUNDLE_PREFIX)],
61+
&[
62+
("TECTONIC_BUNDLE_PREFIX", TEST_BUNDLE_PREFIX),
63+
("TECTONIC_BUNDLE_LOCKED", ""),
64+
// ^ locked url should be ignored if empty
65+
],
6266
);
6367
let url_prefixed_versioned = run_test_program(
6468
TEST_FORMAT_VERSION,
65-
&[("TECTONIC_BUNDLE_PREFIX", TEST_BUNDLE_PREFIX)],
69+
&[
70+
("TECTONIC_BUNDLE_PREFIX", TEST_BUNDLE_PREFIX),
71+
("TECTONIC_BUNDLE_LOCKED", ""),
72+
],
6673
);
6774

6875
assert_eq!(
@@ -86,18 +93,3 @@ fn test_precedence_locked_over_prefix() {
8693
);
8794
assert_eq!(url_both_env_set, TEST_BUNDLE_LOCKED);
8895
}
89-
90-
#[test]
91-
fn test_empty_locked_bundle_ignored() {
92-
let url_empty_locked = run_test_program(
93-
TEST_FORMAT_VERSION,
94-
&[
95-
("TECTONIC_BUNDLE_LOCKED", ""),
96-
("TECTONIC_BUNDLE_PREFIX", TEST_BUNDLE_PREFIX),
97-
],
98-
);
99-
assert_eq!(
100-
url_empty_locked,
101-
format!("{TEST_BUNDLE_PREFIX}/default_bundle_v{TEST_FORMAT_VERSION}.tar",)
102-
);
103-
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
target
2+
Cargo.lock

tests/bundle_env_overrides_test/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ version = "0.0.0-dev.0"
55
edition = "2021"
66

77
[dependencies]
8-
tectonic_bundles = { path = "../../crates/bundles", version = "0.0.0-dev.0" }
8+
tectonic_bundles = { path = "../../crates/bundles" }
99

10-
[package.metadata.internal_dep_versions]
11-
tectonic_bundles = "thiscommit:2025-07-26:IKt5CJV"
10+
# decouple this from the the top-level workspace
11+
[workspace]
12+
members = ["."]

tests/bundle_env_overrides_test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Bundle URL overrides Test
22

3-
This is a simple test program used by the integration tests in the `tectonic_bundles` crate to test the `get_fallback_bundle_url` function with different compile-time environment variable overrides.
3+
This is a simple test program used by the integration tests to test the [`tectonic_bundles::get_fallback_bundle_url`] function with different compile-time environment variable overrides.
44

55
## Purpose
66

0 commit comments

Comments
 (0)