diff --git a/src/core/operations/SeqUtils.js b/src/core/operations/SeqUtils.js index 70207e00..3272e706 100755 --- a/src/core/operations/SeqUtils.js +++ b/src/core/operations/SeqUtils.js @@ -249,7 +249,7 @@ const SeqUtils = { } } - return 0; + return a.localeCompare(b); }, }; diff --git a/test/tests/operations/SeqUtils.js b/test/tests/operations/SeqUtils.js index 7fc2c066..52fbaf32 100644 --- a/test/tests/operations/SeqUtils.js +++ b/test/tests/operations/SeqUtils.js @@ -10,8 +10,8 @@ import TestRegister from "../../TestRegister.js"; TestRegister.addTests([ { name: "SeqUtils - Numeric sort photos", - input: "Photo-1.jpg\nPhoto-4.jpg\nPhoto-2.jpg\nPhoto-3.jpg\n", - expectedOutput: "Photo-1.jpg\nPhoto-2.jpg\nPhoto-3.jpg\nPhoto-4.jpg\n", + input: "Photo-1.jpg\nPhoto-4.jpg\nPhoto-2.jpg\nPhoto-3.jpg", + expectedOutput: "Photo-1.jpg\nPhoto-2.jpg\nPhoto-3.jpg\nPhoto-4.jpg", recipeConfig: [ { "op": "Sort",