2018-12-12 18:34:45 +01:00
|
|
|
/**
|
|
|
|
* Text Encoding Brute Force tests.
|
|
|
|
*
|
|
|
|
* @author Cynser
|
|
|
|
*
|
|
|
|
* @copyright Crown Copyright 2018
|
|
|
|
* @license Apache-2.0
|
|
|
|
*/
|
|
|
|
import TestRegister from "../../TestRegister";
|
|
|
|
|
|
|
|
TestRegister.addTests([
|
|
|
|
{
|
2018-12-17 20:39:12 +01:00
|
|
|
name: "Text Encoding Brute Force - Encode",
|
2018-12-12 18:34:45 +01:00
|
|
|
input: "Булкі праз ляніва сабаку.",
|
2018-12-18 14:50:10 +01:00
|
|
|
expectedMatch: /Windows-1251 Cyrillic \(1251\).{1,10}Булкі праз ляніва сабаку\./,
|
2018-12-12 18:34:45 +01:00
|
|
|
recipeConfig: [
|
|
|
|
{
|
|
|
|
op: "Text Encoding Brute Force",
|
2018-12-17 20:39:12 +01:00
|
|
|
args: ["Encode"],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "Text Encoding Brute Force - Decode",
|
|
|
|
input: "Áóëê³ ïðàç ëÿí³âà ñàáàêó.",
|
2018-12-18 14:50:10 +01:00
|
|
|
expectedMatch: /Windows-1251 Cyrillic \(1251\).{1,10}Булкі праз ляніва сабаку\./,
|
2018-12-17 20:39:12 +01:00
|
|
|
recipeConfig: [
|
|
|
|
{
|
|
|
|
op: "Text Encoding Brute Force",
|
|
|
|
args: ["Decode"],
|
2018-12-12 18:34:45 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
]);
|
|
|
|
|