mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 17:25:07 +02:00
Merge commit '8a70973557ff2605dada63f0dd2c08aa1cfcceb2' into concedo_experimental
# Conflicts: # docs/backend/CANN.md # docs/backend/SYCL.md # examples/model-conversion/scripts/utils/tensor-info.py # ggml/src/ggml-opencl/ggml-opencl.cpp # ggml/src/ggml-opencl/kernels/expm1.cl # ggml/src/ggml-opencl/kernels/mean.cl # ggml/src/ggml-opencl/kernels/softplus.cl # ggml/src/ggml-opencl/kernels/sum_rows.cl # ggml/src/ggml-webgpu/ggml-webgpu-shader-lib.hpp # ggml/src/ggml-webgpu/ggml-webgpu.cpp # ggml/src/ggml-webgpu/wgsl-shaders/common_decls.tmpl # ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py # ggml/src/ggml-webgpu/wgsl-shaders/get_rows.wgsl # ggml/src/ggml-webgpu/wgsl-shaders/mul_mat.wgsl # ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_decls.tmpl # ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_reg_tile.wgsl # ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_subgroup_matrix.wgsl # ggml/src/ggml-webgpu/wgsl-shaders/mul_mat_vec.wgsl # ggml/src/ggml-webgpu/wgsl-shaders/scale.wgsl # tools/server/webui/src/lib/components/app/chat/ChatScreen/ChatScreen.svelte
This commit is contained in:
@@ -691,6 +691,48 @@ static void test_filters(testing & t) {
|
||||
"{\n \"a\": 1,\n \"b\": [\n 1,\n 2\n ]\n}"
|
||||
);
|
||||
|
||||
test_template(t, "indent",
|
||||
"{{ data|indent(2) }}",
|
||||
{{ "data", "foo\nbar" }},
|
||||
"foo\n bar"
|
||||
);
|
||||
|
||||
test_template(t, "indent first only",
|
||||
"{{ data|indent(width=3,first=true) }}",
|
||||
{{ "data", "foo\nbar" }},
|
||||
" foo\n bar"
|
||||
);
|
||||
|
||||
test_template(t, "indent blank lines and first line",
|
||||
"{{ data|indent(width=5,blank=true,first=true) }}",
|
||||
{{ "data", "foo\n\nbar" }},
|
||||
" foo\n \n bar"
|
||||
);
|
||||
|
||||
test_template(t, "indent with default width",
|
||||
"{{ data|indent() }}",
|
||||
{{ "data", "foo\nbar" }},
|
||||
"foo\n bar"
|
||||
);
|
||||
|
||||
test_template(t, "indent with no newline",
|
||||
"{{ data|indent }}",
|
||||
{{ "data", "foo" }},
|
||||
"foo"
|
||||
);
|
||||
|
||||
test_template(t, "indent with trailing newline",
|
||||
"{{ data|indent(blank=true) }}",
|
||||
{{ "data", "foo\n" }},
|
||||
"foo\n "
|
||||
);
|
||||
|
||||
test_template(t, "indent with string",
|
||||
"{{ data|indent(width='>>>>') }}",
|
||||
{{ "data", "foo\nbar" }},
|
||||
"foo\n>>>>bar"
|
||||
);
|
||||
|
||||
test_template(t, "chained filters",
|
||||
"{{ ' HELLO '|trim|lower }}",
|
||||
json::object(),
|
||||
|
||||
Reference in New Issue
Block a user