Added earth surface texture
This commit is contained in:
1 parent
5b802b4455
commit
e77d68d0a6
27 files changed
+1284
-93
No files matched your search
@@ -123,6 +123,60 @@ fn missing_kernels_say_where_they_looked() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lighting_l1_says_what_it_is_missing() {
|
||||
// boxwing.toml has no epoch and no earth_month: L1 cannot pick a month.
|
||||
let no_month = resolved(&[
|
||||
"render",
|
||||
"--scene",
|
||||
"examples/scenes/boxwing.toml",
|
||||
"--lighting",
|
||||
"L1",
|
||||
"--preview",
|
||||
"x.png",
|
||||
]);
|
||||
assert!(!no_month.status.success());
|
||||
let stderr = String::from_utf8_lossy(&no_month.stderr);
|
||||
assert!(stderr.contains("earth_month"), "{stderr}");
|
||||
|
||||
// With a month but no data: the error names the file and the fetch script.
|
||||
let scene = out_dir().join("month.toml");
|
||||
let models = repo().join("examples/models").canonicalize().unwrap();
|
||||
let text = std::fs::read_to_string(repo().join("examples/scenes/boxwing.toml"))
|
||||
.unwrap()
|
||||
.replace("../models", models.to_str().unwrap())
|
||||
+ "\n[appearance]\nearth_month = 7\n";
|
||||
std::fs::write(&scene, text).unwrap();
|
||||
let no_data = resolved(&[
|
||||
"render",
|
||||
"--scene",
|
||||
scene.to_str().unwrap(),
|
||||
"--lighting",
|
||||
"L1",
|
||||
"--data",
|
||||
"no/such/dir",
|
||||
"--preview",
|
||||
"x.png",
|
||||
]);
|
||||
assert!(!no_data.status.success());
|
||||
let stderr = String::from_utf8_lossy(&no_data.stderr);
|
||||
assert!(
|
||||
stderr.contains("bmng-2004-07.jpg") && stderr.contains("fetch-earth.sh"),
|
||||
"{stderr}"
|
||||
);
|
||||
|
||||
let unknown = resolved(&[
|
||||
"render",
|
||||
"--scene",
|
||||
"examples/scenes/boxwing.toml",
|
||||
"--lighting",
|
||||
"L7",
|
||||
"--preview",
|
||||
"x.png",
|
||||
]);
|
||||
assert!(!unknown.status.success());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn adapters_lists_something() {
|
||||
let result = resolved(&["adapters"]);
|
||||
|
||||
Reference in new issue
Block a user