@@ -410,6 +410,34 @@ access-control-allow-credentials: """#
410410 want_code: 0 ,
411411 ..Default :: default ( )
412412 } ,
413+ TestItem {
414+ name: "snapshot a kcl file with a project.toml as png" . to_string( ) ,
415+ args: vec![
416+ "zoo" . to_string( ) ,
417+ "kcl" . to_string( ) ,
418+ "snapshot" . to_string( ) ,
419+ "tests/with-settings/gear.kcl" . to_string( ) ,
420+ "tests/with-settings/gear.png" . to_string( ) ,
421+ ] ,
422+ want_out: r#"Snapshot saved to `tests/with-settings/gear.png`"# . to_string( ) ,
423+ want_err: "" . to_string( ) ,
424+ want_code: 0 ,
425+ ..Default :: default ( )
426+ } ,
427+ TestItem {
428+ name: "snapshot a kcl file with a nested project.toml as png" . to_string( ) ,
429+ args: vec![
430+ "zoo" . to_string( ) ,
431+ "kcl" . to_string( ) ,
432+ "snapshot" . to_string( ) ,
433+ "tests/nested-settings/subdir/gear.kcl" . to_string( ) ,
434+ "tests/nested-settings/subdir/gear.png" . to_string( ) ,
435+ ] ,
436+ want_out: r#"Snapshot saved to `tests/nested-settings/subdir/gear.png`"# . to_string( ) ,
437+ want_err: "" . to_string( ) ,
438+ want_code: 0 ,
439+ ..Default :: default ( )
440+ } ,
413441 TestItem {
414442 name: "snapshot a kcl assembly as png" . to_string( ) ,
415443 args: vec![
@@ -431,7 +459,6 @@ access-control-allow-credentials: """#
431459 "kcl" . to_string( ) ,
432460 "mass" . to_string( ) ,
433461 "tests/gear.kcl" . to_string( ) ,
434- "--src-unit=ft" . to_string( ) ,
435462 "--format=json" . to_string( ) ,
436463 "--output-unit" . to_string( ) ,
437464 "g" . to_string( ) ,
@@ -440,7 +467,7 @@ access-control-allow-credentials: """#
440467 "--material-density-unit" . to_string( ) ,
441468 "lb-ft3" . to_string( ) ,
442469 ] ,
443- want_out: r#"118296.40 "# . to_string( ) ,
470+ want_out: r#"0.004174 "# . to_string( ) ,
444471 want_err: "" . to_string( ) ,
445472 want_code: 0 ,
446473 ..Default :: default ( )
@@ -460,7 +487,7 @@ access-control-allow-credentials: """#
460487 "--material-density-unit" . to_string( ) ,
461488 "lb-ft3" . to_string( ) ,
462489 ] ,
463- want_out: r#"24.905729521549706 "# . to_string( ) ,
490+ want_out: r#"0.0015198 "# . to_string( ) ,
464491 want_err: "" . to_string( ) ,
465492 want_code: 0 ,
466493 ..Default :: default ( )
@@ -480,7 +507,7 @@ access-control-allow-credentials: """#
480507 "--material-density-unit" . to_string( ) ,
481508 "lb-ft3" . to_string( ) ,
482509 ] ,
483- want_out: r#"24.905729521549706 "# . to_string( ) ,
510+ want_out: r#"0.0015198 "# . to_string( ) ,
484511 want_err: "" . to_string( ) ,
485512 want_code: 0 ,
486513 ..Default :: default ( )
@@ -492,7 +519,6 @@ access-control-allow-credentials: """#
492519 "kcl" . to_string( ) ,
493520 "density" . to_string( ) ,
494521 "tests/gear.kcl" . to_string( ) ,
495- "--src-unit=mm" . to_string( ) ,
496522 "--output-unit" . to_string( ) ,
497523 "lb-ft3" . to_string( ) ,
498524 "--material-mass-unit" . to_string( ) ,
@@ -512,7 +538,6 @@ access-control-allow-credentials: """#
512538 "kcl" . to_string( ) ,
513539 "volume" . to_string( ) ,
514540 "tests/gear.kcl" . to_string( ) ,
515- "--src-unit=mm" . to_string( ) ,
516541 "--output-unit" . to_string( ) ,
517542 "cm3" . to_string( ) ,
518543 ] ,
@@ -528,7 +553,6 @@ access-control-allow-credentials: """#
528553 "kcl" . to_string( ) ,
529554 "surface-area" . to_string( ) ,
530555 "tests/gear.kcl" . to_string( ) ,
531- "--src-unit=mm" . to_string( ) ,
532556 "--output-unit" . to_string( ) ,
533557 "cm2" . to_string( ) ,
534558 ] ,
@@ -544,7 +568,6 @@ access-control-allow-credentials: """#
544568 "kcl" . to_string( ) ,
545569 "center-of-mass" . to_string( ) ,
546570 "tests/gear.kcl" . to_string( ) ,
547- "--src-unit=mm" . to_string( ) ,
548571 "--output-unit" . to_string( ) ,
549572 "cm" . to_string( ) ,
550573 ] ,
@@ -560,7 +583,6 @@ access-control-allow-credentials: """#
560583 "kcl" . to_string( ) ,
561584 "export" . to_string( ) ,
562585 "--output-format=gltf" . to_string( ) ,
563- "--src-unit=mm" . to_string( ) ,
564586 "tests/gear.kcl" . to_string( ) ,
565587 "tests/" . to_string( ) ,
566588 ] ,
@@ -577,7 +599,6 @@ access-control-allow-credentials: """#
577599 "export" . to_string( ) ,
578600 "--output-format=step" . to_string( ) ,
579601 "--deterministic" . to_string( ) ,
580- "--src-unit=mm" . to_string( ) ,
581602 "tests/gear.kcl" . to_string( ) ,
582603 "tests/" . to_string( ) ,
583604 ] ,
@@ -593,7 +614,6 @@ access-control-allow-credentials: """#
593614 "kcl" . to_string( ) ,
594615 "export" . to_string( ) ,
595616 "--output-format=gltf" . to_string( ) ,
596- "--src-unit=mm" . to_string( ) ,
597617 "tests/parse_error.kcl" . to_string( ) ,
598618 "tests/" . to_string( ) ,
599619 ] ,
0 commit comments