mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 00:06:17 -04:00
ESM: Ported various tests for completed operations
This commit is contained in:
parent
3fd1f4e6d9
commit
1dddcb4345
23 changed files with 44 additions and 111 deletions
2
test/tests/operations/BCD.js → test/tests/operations/BCD.mjs
Executable file → Normal file
2
test/tests/operations/BCD.js → test/tests/operations/BCD.mjs
Executable file → Normal file
|
@ -5,7 +5,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/BSON.js → test/tests/operations/BSON.mjs
Executable file → Normal file
2
test/tests/operations/BSON.js → test/tests/operations/BSON.mjs
Executable file → Normal file
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/Base58.js → test/tests/operations/Base58.mjs
Executable file → Normal file
2
test/tests/operations/Base58.js → test/tests/operations/Base58.mjs
Executable file → Normal file
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/BitwiseOp.js → test/tests/operations/BitwiseOp.mjs
Executable file → Normal file
2
test/tests/operations/BitwiseOp.js → test/tests/operations/BitwiseOp.mjs
Executable file → Normal file
|
@ -5,7 +5,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/ByteRepr.js → test/tests/operations/ByteRepr.mjs
Executable file → Normal file
2
test/tests/operations/ByteRepr.js → test/tests/operations/ByteRepr.mjs
Executable file → Normal file
|
@ -5,7 +5,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
const ALL_BYTES = [
|
||||
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
|
2
test/tests/operations/CharEnc.js → test/tests/operations/CharEnc.mjs
Executable file → Normal file
2
test/tests/operations/CharEnc.js → test/tests/operations/CharEnc.mjs
Executable file → Normal file
|
@ -5,7 +5,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/Code.js → test/tests/operations/Code.mjs
Executable file → Normal file
2
test/tests/operations/Code.js → test/tests/operations/Code.mjs
Executable file → Normal file
|
@ -7,7 +7,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
const JPATH_TEST_DATA = {
|
||||
"store": {
|
2
test/tests/operations/Compress.js → test/tests/operations/Compress.mjs
Executable file → Normal file
2
test/tests/operations/Compress.js → test/tests/operations/Compress.mjs
Executable file → Normal file
|
@ -5,7 +5,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
74
test/tests/operations/Cipher.js → test/tests/operations/Crypt.mjs
Executable file → Normal file
74
test/tests/operations/Cipher.js → test/tests/operations/Crypt.mjs
Executable file → Normal file
|
@ -1,82 +1,14 @@
|
|||
/**
|
||||
* Cipher tests.
|
||||
* Crypt tests.
|
||||
*
|
||||
* @author Matt C [matt@artemisbot.uk]
|
||||
* @author n1474335 [n1474335@gmail.com]
|
||||
*
|
||||
* @copyright Crown Copyright 2017
|
||||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "Bifid Cipher Encode: no input",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Encode",
|
||||
"args": ["nothing"]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Encode: no key",
|
||||
input: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
|
||||
expectedOutput: "Vq daqcliho rmltofvlnc qbdhlcr nt qdq Fbm-Rdkkm vuoottnoi aitp al axf tdtmvt owppkaodtx.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Encode",
|
||||
"args": [""]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Encode: normal",
|
||||
input: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
|
||||
expectedOutput: "Wc snpsigdd cpfrrcxnfi hikdnnp dm crc Fcb-Pdeug vueageacc vtyl sa zxm crebzp lyoeuaiwpv.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Encode",
|
||||
"args": ["Schrodinger"]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Decode: no input",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Decode",
|
||||
"args": ["nothing"]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Decode: no key",
|
||||
input: "Vq daqcliho rmltofvlnc qbdhlcr nt qdq Fbm-Rdkkm vuoottnoi aitp al axf tdtmvt owppkaodtx.",
|
||||
expectedOutput: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Decode",
|
||||
"args": [""]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Bifid Cipher Decode: normal",
|
||||
input: "Wc snpsigdd cpfrrcxnfi hikdnnp dm crc Fcb-Pdeug vueageacc vtyl sa zxm crebzp lyoeuaiwpv.",
|
||||
expectedOutput: "We recreate conditions similar to the Van-Allen radiation belt in our secure facilities.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Bifid Cipher Decode",
|
||||
"args": ["Schrodinger"]
|
||||
}
|
||||
],
|
||||
},
|
||||
|
||||
/**
|
||||
* Ciphers
|
||||
*
|
2
test/tests/operations/DateTime.js → test/tests/operations/DateTime.mjs
Executable file → Normal file
2
test/tests/operations/DateTime.js → test/tests/operations/DateTime.mjs
Executable file → Normal file
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/FlowControl.js → test/tests/operations/FlowControl.mjs
Executable file → Normal file
2
test/tests/operations/FlowControl.js → test/tests/operations/FlowControl.mjs
Executable file → Normal file
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
const ALL_BYTES = [
|
||||
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
|
0
test/tests/operations/Hash.mjs
Executable file → Normal file
0
test/tests/operations/Hash.mjs
Executable file → Normal file
2
test/tests/operations/Hexdump.js → test/tests/operations/Hexdump.mjs
Executable file → Normal file
2
test/tests/operations/Hexdump.js → test/tests/operations/Hexdump.mjs
Executable file → Normal file
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
const ALL_BYTES = [
|
||||
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
|
2
test/tests/operations/Image.js → test/tests/operations/Image.mjs
Executable file → Normal file
2
test/tests/operations/Image.js → test/tests/operations/Image.mjs
Executable file → Normal file
|
@ -7,7 +7,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/MS.js → test/tests/operations/MS.mjs
Executable file → Normal file
2
test/tests/operations/MS.js → test/tests/operations/MS.mjs
Executable file → Normal file
|
@ -5,7 +5,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/MorseCode.js → test/tests/operations/MorseCode.mjs
Executable file → Normal file
2
test/tests/operations/MorseCode.js → test/tests/operations/MorseCode.mjs
Executable file → Normal file
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/NetBIOS.js → test/tests/operations/NetBIOS.mjs
Executable file → Normal file
2
test/tests/operations/NetBIOS.js → test/tests/operations/NetBIOS.mjs
Executable file → Normal file
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/OTP.js → test/tests/operations/OTP.mjs
Executable file → Normal file
2
test/tests/operations/OTP.js → test/tests/operations/OTP.mjs
Executable file → Normal file
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/PHP.js → test/tests/operations/PHP.mjs
Executable file → Normal file
2
test/tests/operations/PHP.js → test/tests/operations/PHP.mjs
Executable file → Normal file
|
@ -7,7 +7,7 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/Regex.js → test/tests/operations/Regex.mjs
Executable file → Normal file
2
test/tests/operations/Regex.js → test/tests/operations/Regex.mjs
Executable file → Normal file
|
@ -5,7 +5,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/SeqUtils.js → test/tests/operations/SeqUtils.mjs
Executable file → Normal file
2
test/tests/operations/SeqUtils.js → test/tests/operations/SeqUtils.mjs
Executable file → Normal file
|
@ -5,7 +5,7 @@
|
|||
* @copyright Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
2
test/tests/operations/StrUtils.js → test/tests/operations/StrUtils.mjs
Executable file → Normal file
2
test/tests/operations/StrUtils.js → test/tests/operations/StrUtils.mjs
Executable file → Normal file
|
@ -5,7 +5,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
Loading…
Add table
Add a link
Reference in a new issue