diff --git a/test/index.mjs b/test/index.mjs index 2feaef1..05fd004 100644 --- a/test/index.mjs +++ b/test/index.mjs @@ -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"; diff --git a/test/tests/operations/BCD.js b/test/tests/operations/BCD.mjs old mode 100755 new mode 100644 similarity index 98% rename from test/tests/operations/BCD.js rename to test/tests/operations/BCD.mjs index 427f64d..6f00abe --- a/test/tests/operations/BCD.js +++ b/test/tests/operations/BCD.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/BSON.js b/test/tests/operations/BSON.mjs old mode 100755 new mode 100644 similarity index 96% rename from test/tests/operations/BSON.js rename to test/tests/operations/BSON.mjs index 61ee10c..2b99d84 --- a/test/tests/operations/BSON.js +++ b/test/tests/operations/BSON.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2018 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/Base58.js b/test/tests/operations/Base58.mjs old mode 100755 new mode 100644 similarity index 97% rename from test/tests/operations/Base58.js rename to test/tests/operations/Base58.mjs index d09a3fc..ccb7a26 --- a/test/tests/operations/Base58.js +++ b/test/tests/operations/Base58.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/BitwiseOp.js b/test/tests/operations/BitwiseOp.mjs old mode 100755 new mode 100644 similarity index 97% rename from test/tests/operations/BitwiseOp.js rename to test/tests/operations/BitwiseOp.mjs index ba196be..7fdedde --- a/test/tests/operations/BitwiseOp.js +++ b/test/tests/operations/BitwiseOp.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/ByteRepr.js b/test/tests/operations/ByteRepr.mjs old mode 100755 new mode 100644 similarity index 99% rename from test/tests/operations/ByteRepr.js rename to test/tests/operations/ByteRepr.mjs index 13fbd4c..913755b --- a/test/tests/operations/ByteRepr.js +++ b/test/tests/operations/ByteRepr.mjs @@ -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", diff --git a/test/tests/operations/CharEnc.js b/test/tests/operations/CharEnc.mjs old mode 100755 new mode 100644 similarity index 97% rename from test/tests/operations/CharEnc.js rename to test/tests/operations/CharEnc.mjs index f5e0750..c7c5f0c --- a/test/tests/operations/CharEnc.js +++ b/test/tests/operations/CharEnc.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/Code.js b/test/tests/operations/Code.mjs old mode 100755 new mode 100644 similarity index 99% rename from test/tests/operations/Code.js rename to test/tests/operations/Code.mjs index b13dcfd..3b282b6 --- a/test/tests/operations/Code.js +++ b/test/tests/operations/Code.mjs @@ -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": { diff --git a/test/tests/operations/Compress.js b/test/tests/operations/Compress.mjs old mode 100755 new mode 100644 similarity index 92% rename from test/tests/operations/Compress.js rename to test/tests/operations/Compress.mjs index 48f1de8..03a041a --- a/test/tests/operations/Compress.js +++ b/test/tests/operations/Compress.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/Cipher.js b/test/tests/operations/Crypt.mjs old mode 100755 new mode 100644 similarity index 96% rename from test/tests/operations/Cipher.js rename to test/tests/operations/Crypt.mjs index 6b21deb..5e2a332 --- a/test/tests/operations/Cipher.js +++ b/test/tests/operations/Crypt.mjs @@ -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 * diff --git a/test/tests/operations/DateTime.js b/test/tests/operations/DateTime.mjs old mode 100755 new mode 100644 similarity index 94% rename from test/tests/operations/DateTime.js rename to test/tests/operations/DateTime.mjs index f8226ac..fa19d4d --- a/test/tests/operations/DateTime.js +++ b/test/tests/operations/DateTime.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/FlowControl.js b/test/tests/operations/FlowControl.mjs old mode 100755 new mode 100644 similarity index 99% rename from test/tests/operations/FlowControl.js rename to test/tests/operations/FlowControl.mjs index 49b1302..bf923e8 --- a/test/tests/operations/FlowControl.js +++ b/test/tests/operations/FlowControl.mjs @@ -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", diff --git a/test/tests/operations/Hash.mjs b/test/tests/operations/Hash.mjs old mode 100755 new mode 100644 diff --git a/test/tests/operations/Hexdump.js b/test/tests/operations/Hexdump.mjs old mode 100755 new mode 100644 similarity index 99% rename from test/tests/operations/Hexdump.js rename to test/tests/operations/Hexdump.mjs index 842e1fd..7dff3f8 --- a/test/tests/operations/Hexdump.js +++ b/test/tests/operations/Hexdump.mjs @@ -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", diff --git a/test/tests/operations/Image.js b/test/tests/operations/Image.mjs old mode 100755 new mode 100644 similarity index 99% rename from test/tests/operations/Image.js rename to test/tests/operations/Image.mjs index be822c8..4cb405e --- a/test/tests/operations/Image.js +++ b/test/tests/operations/Image.mjs @@ -7,7 +7,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/MS.js b/test/tests/operations/MS.mjs old mode 100755 new mode 100644 similarity index 91% rename from test/tests/operations/MS.js rename to test/tests/operations/MS.mjs index acf0f08..f601883 --- a/test/tests/operations/MS.js +++ b/test/tests/operations/MS.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/MorseCode.js b/test/tests/operations/MorseCode.mjs old mode 100755 new mode 100644 similarity index 93% rename from test/tests/operations/MorseCode.js rename to test/tests/operations/MorseCode.mjs index 4f4d59f..ea8278e --- a/test/tests/operations/MorseCode.js +++ b/test/tests/operations/MorseCode.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/NetBIOS.js b/test/tests/operations/NetBIOS.mjs old mode 100755 new mode 100644 similarity index 93% rename from test/tests/operations/NetBIOS.js rename to test/tests/operations/NetBIOS.mjs index 2994b79..291412f --- a/test/tests/operations/NetBIOS.js +++ b/test/tests/operations/NetBIOS.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/OTP.js b/test/tests/operations/OTP.mjs old mode 100755 new mode 100644 similarity index 91% rename from test/tests/operations/OTP.js rename to test/tests/operations/OTP.mjs index b321e7c..ccb215a --- a/test/tests/operations/OTP.js +++ b/test/tests/operations/OTP.mjs @@ -6,7 +6,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/PHP.js b/test/tests/operations/PHP.mjs old mode 100755 new mode 100644 similarity index 96% rename from test/tests/operations/PHP.js rename to test/tests/operations/PHP.mjs index a42ee43..19a5bc8 --- a/test/tests/operations/PHP.js +++ b/test/tests/operations/PHP.mjs @@ -7,7 +7,7 @@ * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/Regex.js b/test/tests/operations/Regex.mjs old mode 100755 new mode 100644 similarity index 96% rename from test/tests/operations/Regex.js rename to test/tests/operations/Regex.mjs index dc16910..a987bbe --- a/test/tests/operations/Regex.js +++ b/test/tests/operations/Regex.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/SeqUtils.js b/test/tests/operations/SeqUtils.mjs old mode 100755 new mode 100644 similarity index 95% rename from test/tests/operations/SeqUtils.js rename to test/tests/operations/SeqUtils.mjs index 52fbaf3..88acde8 --- a/test/tests/operations/SeqUtils.js +++ b/test/tests/operations/SeqUtils.mjs @@ -5,7 +5,7 @@ * @copyright Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ { diff --git a/test/tests/operations/StrUtils.js b/test/tests/operations/StrUtils.mjs old mode 100755 new mode 100644 similarity index 99% rename from test/tests/operations/StrUtils.js rename to test/tests/operations/StrUtils.mjs index 4777fd1..433593f --- a/test/tests/operations/StrUtils.js +++ b/test/tests/operations/StrUtils.mjs @@ -5,7 +5,7 @@ * @copyright Crown Copyright 2017 * @license Apache-2.0 */ -import TestRegister from "../../TestRegister.js"; +import TestRegister from "../../TestRegister"; TestRegister.addTests([ {