ESM: Ported various tests for completed operations
parent
3fd1f4e6d9
commit
1dddcb4345
|
@ -24,33 +24,34 @@ global.ENVIRONMENT_IS_WEB = function() {
|
|||
};
|
||||
|
||||
import TestRegister from "./TestRegister";
|
||||
// import "./tests/operations/Base58.js";
|
||||
import "./tests/operations/Base58";
|
||||
import "./tests/operations/Base64";
|
||||
// import "./tests/operations/BCD.js";
|
||||
// import "./tests/operations/BitwiseOp.js";
|
||||
// import "./tests/operations/BSON.js";
|
||||
// import "./tests/operations/ByteRepr.js";
|
||||
import "./tests/operations/BCD";
|
||||
// import "./tests/operations/BitwiseOp";
|
||||
// import "./tests/operations/BSON";
|
||||
import "./tests/operations/ByteRepr";
|
||||
import "./tests/operations/CartesianProduct";
|
||||
// import "./tests/operations/CharEnc.js";
|
||||
import "./tests/operations/CharEnc";
|
||||
import "./tests/operations/Ciphers";
|
||||
import "./tests/operations/Checksum";
|
||||
// import "./tests/operations/Code.js";
|
||||
// import "./tests/operations/Compress.js";
|
||||
// import "./tests/operations/DateTime.js";
|
||||
// import "./tests/operations/FlowControl.js";
|
||||
// import "./tests/operations/Code";
|
||||
// import "./tests/operations/Compress";
|
||||
// import "./tests/operations/Crypt";
|
||||
// import "./tests/operations/DateTime";
|
||||
// import "./tests/operations/FlowControl";
|
||||
import "./tests/operations/Hash";
|
||||
// import "./tests/operations/Hexdump.js";
|
||||
// import "./tests/operations/Image.js";
|
||||
// import "./tests/operations/MorseCode.js";
|
||||
// import "./tests/operations/MS.js";
|
||||
// import "./tests/operations/PHP.js";
|
||||
// import "./tests/operations/NetBIOS.js";
|
||||
// import "./tests/operations/OTP.js";
|
||||
import "./tests/operations/Hexdump";
|
||||
// import "./tests/operations/Image";
|
||||
import "./tests/operations/MorseCode";
|
||||
import "./tests/operations/MS";
|
||||
// import "./tests/operations/PHP";
|
||||
import "./tests/operations/NetBIOS";
|
||||
// import "./tests/operations/OTP";
|
||||
import "./tests/operations/PowerSet";
|
||||
// import "./tests/operations/Regex.js";
|
||||
// import "./tests/operations/Regex";
|
||||
import "./tests/operations/Rotate";
|
||||
// import "./tests/operations/StrUtils.js";
|
||||
// import "./tests/operations/SeqUtils.js";
|
||||
// import "./tests/operations/StrUtils";
|
||||
import "./tests/operations/SeqUtils";
|
||||
import "./tests/operations/SetDifference";
|
||||
import "./tests/operations/SetIntersection";
|
||||
import "./tests/operations/SetUnion";
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
|
@ -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([
|
||||
{
|
|
@ -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([
|
||||
{
|
|
@ -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",
|
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",
|
|
@ -7,7 +7,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
|
@ -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([
|
||||
{
|
|
@ -6,7 +6,7 @@
|
|||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
|
@ -7,7 +7,7 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import TestRegister from "../../TestRegister.js";
|
||||
import TestRegister from "../../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
|
@ -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…
Reference in New Issue