mirror of
https://github.com/gchq/CyberChef
synced 2026-01-04 09:33:21 +00:00
Merge branch 'insense' of https://github.com/masq/CyberChef into masq-insense
This commit is contained in:
@@ -82,6 +82,7 @@ import "./tests/TranslateDateTimeFormat";
|
||||
import "./tests/Magic";
|
||||
import "./tests/ParseTLV";
|
||||
import "./tests/Media";
|
||||
import "./tests/ToFromInsensitiveRegex";
|
||||
|
||||
// Cannot test operations that use the File type yet
|
||||
//import "./tests/SplitColourChannels";
|
||||
|
||||
56
tests/operations/tests/ToFromInsensitiveRegex.mjs
Normal file
56
tests/operations/tests/ToFromInsensitiveRegex.mjs
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* To/From Case Insensitive Regex tests.
|
||||
*
|
||||
* @author masq [github.cyberchef@masq.cc]
|
||||
*
|
||||
* @copyright Crown Copyright 2018
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "To Case Insensitive Regex: nothing",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "To Case Insensitive Regex",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "From Case Insensitive Regex: nothing",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "From Case Insensitive Regex",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "To Case Insensitive Regex: simple test",
|
||||
input: "S0meth!ng",
|
||||
expectedOutput: "[sS]0[mM][eE][tT][hH]![nN][gG]",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "To Case Insensitive Regex",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "From Case Insensitive Regex: simple test",
|
||||
input: "[sS]0[mM][eE][tT][hH]![nN][Gg] [wr][On][g]?",
|
||||
expectedOutput: "s0meth!nG [wr][On][g]?",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "From Case Insensitive Regex",
|
||||
args: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
||||
Reference in New Issue
Block a user