fix(pdfcpu): correct sorting for the output paths of the split method

This commit is contained in:
Julien Neuhart
2025-02-12 11:47:45 +01:00
parent 3dc8c18849
commit 80f3f89a89
7 changed files with 77 additions and 157 deletions

View File

@@ -230,15 +230,15 @@ func TestPdfCpu_Split(t *testing.T) {
scenario: "success (intervals)",
ctx: context.TODO(),
mode: gotenberg.SplitMode{Mode: gotenberg.SplitModeIntervals, Span: "1"},
inputPath: "/tests/test/testdata/pdfengines/sample1.pdf",
inputPath: "/tests/test/testdata/pdfengines/sample4.pdf",
expectError: false,
expectOutputPathsCount: 3,
expectOutputPathsCount: 20,
},
{
scenario: "success (pages)",
ctx: context.TODO(),
mode: gotenberg.SplitMode{Mode: gotenberg.SplitModePages, Span: "1"},
inputPath: "/tests/test/testdata/pdfengines/sample1.pdf",
inputPath: "/tests/test/testdata/pdfengines/sample4.pdf",
expectError: false,
expectOutputPathsCount: 1,
},
@@ -246,7 +246,7 @@ func TestPdfCpu_Split(t *testing.T) {
scenario: "success (pages & unify)",
ctx: context.TODO(),
mode: gotenberg.SplitMode{Mode: gotenberg.SplitModePages, Span: "1-2", Unify: true},
inputPath: "/tests/test/testdata/pdfengines/sample1.pdf",
inputPath: "/tests/test/testdata/pdfengines/sample4.pdf",
expectError: false,
expectOutputPathsCount: 1,
},