Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/operations/A1Z26CipherDecode.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class A1Z26CipherDecode extends Operation {
const delim = Utils.charRep(args[0] || "Space");

if (input.length === 0) {
return [];
return "";
}

const bites = input.split(delim);
Expand Down
1 change: 1 addition & 0 deletions tests/operations/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import { setLongTestFailure, logTestReport } from "../lib/utils.mjs";

import TestRegister from "../lib/TestRegister.mjs";
import "./tests/A1Z26CipherDecode.mjs";
import "./tests/AESKeyWrap.mjs";
import "./tests/AlternatingCaps.mjs";
import "./tests/AvroToJSON.mjs";
Expand Down
33 changes: 33 additions & 0 deletions tests/operations/tests/A1Z26CipherDecode.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* A1Z26 Cipher Decode tests
*
* @author brick-pixel
* @copyright Crown Copyright 2026
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";

TestRegister.addTests([
{
"name": "A1Z26 Cipher Decode: basic decode",
"input": "8 5 12 12 15",
"expectedOutput": "hello",
"recipeConfig": [
{
"op": "A1Z26 Cipher Decode",
"args": ["Space"]
}
]
},
{
"name": "A1Z26 Cipher Decode: empty input returns empty string",
"input": "",
"expectedOutput": "",
"recipeConfig": [
{
"op": "A1Z26 Cipher Decode",
"args": ["Space"]
}
]
}
]);
Loading