mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 22:28:16 +01:00
14 lines
293 B
OpenSCAD
14 lines
293 B
OpenSCAD
use <util/slice.scad>;
|
|
|
|
module test_slice() {
|
|
echo("==== test_slice ====");
|
|
|
|
lt = [for(c = "helloworld") c];
|
|
expected1 = [for(c = "hello") c];
|
|
expected2 = [for(c = "world") c];
|
|
|
|
assert(expected1 == slice(lt, 0, 5));
|
|
assert(expected2 == slice(lt, 5));
|
|
}
|
|
|
|
test_slice(); |