Skip to content

Commit fc7c631

Browse files
authored
Merge pull request #1714 from sw5678/master
Adding and removing tests
2 parents 9829b41 + c7377da commit fc7c631

File tree

4 files changed

+64
-174
lines changed

4 files changed

+64
-174
lines changed

tests/operations/index.mjs

+60-61
Original file line numberDiff line numberDiff line change
@@ -17,131 +17,130 @@ import {
1717
} from "../lib/utils.mjs";
1818

1919
import TestRegister from "../lib/TestRegister.mjs";
20-
import "./tests/BCD.mjs";
21-
import "./tests/BSON.mjs";
20+
import "./tests/AESKeyWrap.mjs";
21+
import "./tests/AvroToJSON.mjs";
2222
import "./tests/BaconCipher.mjs";
2323
import "./tests/Base45.mjs";
2424
import "./tests/Base58.mjs";
25-
import "./tests/Base64.mjs";
2625
import "./tests/Base62.mjs";
26+
import "./tests/Base64.mjs";
2727
import "./tests/Base85.mjs";
2828
import "./tests/Base92.mjs";
29+
import "./tests/BCD.mjs";
2930
import "./tests/BitwiseOp.mjs";
31+
import "./tests/BLAKE2b.mjs";
32+
import "./tests/BLAKE2s.mjs";
33+
import "./tests/Bombe.mjs";
34+
import "./tests/BSON.mjs";
3035
import "./tests/ByteRepr.mjs";
36+
import "./tests/CaesarBoxCipher.mjs";
3137
import "./tests/CartesianProduct.mjs";
32-
import "./tests/CetaceanCipherEncode.mjs";
38+
import "./tests/CBORDecode.mjs";
39+
import "./tests/CBOREncode.mjs";
3340
import "./tests/CetaceanCipherDecode.mjs";
41+
import "./tests/CetaceanCipherEncode.mjs";
3442
import "./tests/ChaCha.mjs";
35-
import "./tests/CharEnc.mjs";
3643
import "./tests/ChangeIPFormat.mjs";
44+
import "./tests/CharEnc.mjs";
3745
import "./tests/Charts.mjs";
3846
import "./tests/Checksum.mjs";
3947
import "./tests/Ciphers.mjs";
48+
import "./tests/CipherSaber2.mjs";
49+
import "./tests/CMAC.mjs";
4050
import "./tests/Code.mjs";
51+
import "./tests/Colossus.mjs";
4152
import "./tests/Comment.mjs";
4253
import "./tests/Compress.mjs";
4354
import "./tests/ConditionalJump.mjs";
55+
import "./tests/ConvertCoordinateFormat.mjs";
56+
import "./tests/ConvertToNATOAlphabet.mjs";
4457
import "./tests/Crypt.mjs";
4558
import "./tests/CSV.mjs";
4659
import "./tests/DateTime.mjs";
60+
import "./tests/DefangIP.mjs";
61+
import "./tests/ELFInfo.mjs";
62+
import "./tests/Enigma.mjs";
4763
import "./tests/ExtractEmailAddresses.mjs";
64+
import "./tests/FileTree.mjs";
65+
import "./tests/FletcherChecksum.mjs";
4866
import "./tests/Fork.mjs";
4967
import "./tests/FromDecimal.mjs";
5068
import "./tests/GenerateAllHashes.mjs";
51-
import "./tests/Gzip.mjs";
69+
import "./tests/GenerateDeBruijnSequence.mjs";
70+
import "./tests/GetAllCasings.mjs";
71+
import "./tests/GOST.mjs";
5272
import "./tests/Gunzip.mjs";
73+
import "./tests/Gzip.mjs";
5374
import "./tests/Hash.mjs";
75+
import "./tests/HASSH.mjs";
5476
import "./tests/HaversineDistance.mjs";
5577
import "./tests/Hex.mjs";
5678
import "./tests/Hexdump.mjs";
79+
import "./tests/HKDF.mjs";
5780
import "./tests/Image.mjs";
5881
import "./tests/IndexOfCoincidence.mjs";
59-
import "./tests/Jump.mjs";
82+
import "./tests/JA3Fingerprint.mjs";
83+
import "./tests/JA3SFingerprint.mjs";
6084
import "./tests/JSONBeautify.mjs";
6185
import "./tests/JSONMinify.mjs";
6286
import "./tests/JSONtoCSV.mjs";
87+
import "./tests/Jump.mjs";
6388
import "./tests/JWTDecode.mjs";
6489
import "./tests/JWTSign.mjs";
6590
import "./tests/JWTVerify.mjs";
91+
import "./tests/LevenshteinDistance.mjs";
92+
import "./tests/Lorenz.mjs";
93+
import "./tests/LS47.mjs";
94+
import "./tests/LuhnChecksum.mjs";
6695
import "./tests/LZNT1Decompress.mjs";
67-
import "./tests/MS.mjs";
96+
import "./tests/LZString.mjs";
6897
import "./tests/Magic.mjs";
98+
import "./tests/Media.mjs";
6999
import "./tests/MorseCode.mjs";
100+
import "./tests/MS.mjs";
101+
import "./tests/MultipleBombe.mjs";
70102
import "./tests/MurmurHash3.mjs";
71103
import "./tests/NetBIOS.mjs";
72104
import "./tests/NormaliseUnicode.mjs";
105+
import "./tests/NTLM.mjs";
73106
import "./tests/OTP.mjs";
74-
import "./tests/PGP.mjs";
75-
import "./tests/PHP.mjs";
76107
import "./tests/ParseIPRange.mjs";
108+
import "./tests/ParseObjectIDTimestamp.mjs";
77109
import "./tests/ParseQRCode.mjs";
110+
import "./tests/ParseSSHHostKey.mjs";
111+
import "./tests/ParseTCP.mjs";
112+
import "./tests/ParseTLV.mjs";
113+
import "./tests/ParseUDP.mjs";
78114
import "./tests/PEMtoHex.mjs";
115+
import "./tests/PGP.mjs";
116+
import "./tests/PHP.mjs";
79117
import "./tests/PowerSet.mjs";
118+
import "./tests/Protobuf.mjs";
119+
import "./tests/Rabbit.mjs";
80120
import "./tests/Regex.mjs";
81121
import "./tests/Register.mjs";
122+
import "./tests/RisonEncodeDecode.mjs";
82123
import "./tests/Rotate.mjs";
124+
import "./tests/RSA.mjs";
83125
import "./tests/SeqUtils.mjs";
84126
import "./tests/SetDifference.mjs";
85127
import "./tests/SetIntersection.mjs";
86128
import "./tests/SetUnion.mjs";
129+
import "./tests/Shuffle.mjs";
130+
import "./tests/SIGABA.mjs";
87131
import "./tests/SM4.mjs";
132+
// import "./tests/SplitColourChannels.mjs"; // Cannot test operations that use the File type yet
88133
import "./tests/StrUtils.mjs";
134+
import "./tests/Subsection.mjs";
135+
import "./tests/SwapCase.mjs";
89136
import "./tests/SymmetricDifference.mjs";
90137
import "./tests/TextEncodingBruteForce.mjs";
91-
import "./tests/TranslateDateTimeFormat.mjs";
92-
import "./tests/Magic.mjs";
93-
import "./tests/ParseTLV.mjs";
94-
import "./tests/Media.mjs";
95138
import "./tests/ToFromInsensitiveRegex.mjs";
96-
import "./tests/YARA.mjs";
97-
import "./tests/ConvertCoordinateFormat.mjs";
98-
import "./tests/Enigma.mjs";
99-
import "./tests/Bombe.mjs";
100-
import "./tests/MultipleBombe.mjs";
139+
import "./tests/TranslateDateTimeFormat.mjs";
101140
import "./tests/Typex.mjs";
102-
import "./tests/BLAKE2b.mjs";
103-
import "./tests/BLAKE2s.mjs";
104-
import "./tests/Protobuf.mjs";
105-
import "./tests/ParseSSHHostKey.mjs";
106-
import "./tests/DefangIP.mjs";
107-
import "./tests/ParseUDP.mjs";
108-
import "./tests/ParseTCP.mjs";
109-
import "./tests/AvroToJSON.mjs";
110-
import "./tests/Lorenz.mjs";
111-
import "./tests/LuhnChecksum.mjs";
112-
import "./tests/CipherSaber2.mjs";
113-
import "./tests/Colossus.mjs";
114-
import "./tests/ParseObjectIDTimestamp.mjs";
115-
import "./tests/Unicode.mjs";
116-
import "./tests/RSA.mjs";
117-
import "./tests/CBOREncode.mjs";
118-
import "./tests/CBORDecode.mjs";
119-
import "./tests/RisonEncodeDecode.mjs";
120-
import "./tests/JA3Fingerprint.mjs";
121-
import "./tests/JA3SFingerprint.mjs";
122-
import "./tests/HASSH.mjs";
123-
import "./tests/GetAllCasings.mjs";
124-
import "./tests/SIGABA.mjs";
125-
import "./tests/ELFInfo.mjs";
126-
import "./tests/Subsection.mjs";
127-
import "./tests/CaesarBoxCipher.mjs";
128141
import "./tests/UnescapeString.mjs";
129-
import "./tests/LS47.mjs";
130-
import "./tests/LZString.mjs";
131-
import "./tests/NTLM.mjs";
132-
import "./tests/Shuffle.mjs";
133-
import "./tests/FletcherChecksum.mjs";
134-
import "./tests/CMAC.mjs";
135-
import "./tests/AESKeyWrap.mjs";
136-
import "./tests/Rabbit.mjs";
137-
import "./tests/LevenshteinDistance.mjs";
138-
import "./tests/SwapCase.mjs";
139-
import "./tests/HKDF.mjs";
140-
import "./tests/GenerateDeBruijnSequence.mjs";
141-
import "./tests/GOST.mjs";
142-
143-
// Cannot test operations that use the File type yet
144-
// import "./tests/SplitColourChannels.mjs";
142+
import "./tests/Unicode.mjs";
143+
import "./tests/YARA.mjs";
145144

146145
const testStatus = {
147146
allTestsPassing: true,

tests/operations/tests/FileTree.mjs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/**
2+
* File tree tests.
3+
*
24
* @author sw5678
35
* @copyright Crown Copyright 2023
46
* @license Apache-2.0
@@ -7,14 +9,13 @@ import TestRegister from "../../lib/TestRegister.mjs";
79

810
TestRegister.addTests([
911
{
10-
"name": "Swap Case: basic example",
12+
"name": "File Tree: basic example",
1113
"input": "/test_dir1/test_file1.txt\n/test_dir1/test_file2.txt\n/test_dir2/test_file1.txt",
1214
"expectedOutput": "test_dir1\n|---test_file1.txt\n|---test_file2.txt\ntest_dir2\n|---test_file1.txt",
1315
"recipeConfig": [
1416
{
1517
"op": "File Tree",
16-
"args": [
17-
],
18+
"args": ["/", "Line feed"],
1819
},
1920
],
2021
}

tests/operations/tests/FromGeohash.mjs

-55
This file was deleted.

tests/operations/tests/ToGeohash.mjs

-55
This file was deleted.

0 commit comments

Comments
 (0)