-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Expand file tree
/
Copy pathBase85.js
More file actions
89 lines (88 loc) · 2.2 KB
/
Base85.js
File metadata and controls
89 lines (88 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/**
* Base85 tests.
*
* @author George J [george@penguingeorge.com]
*
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/
import TestRegister from "../../TestRegister.js";
TestRegister.addTests([
{
name: "To Base85 (Standard): nothing",
input: "",
expectedOutput: "",
recipeConfig: [
{
op: "To Base85",
args: [null, false],
},
],
},
{
name: "To Base85 (Standard (Ascii85)): Hello, World!",
input: "Hello, World!",
expectedOutput: "87cURD_*#4DfTZ)+T",
recipeConfig: [
{
op: "To Base85",
args: [null, false],
},
],
},
{
name: "To Base85 (Standard (Ascii85)): UTF-8",
input: "ნუ პანიკას",
expectedOutput: "iIdZZK;0RJK:_%SOPth^iIdNVK:1\\NOPthc",
recipeConfig: [
{
op: "To Base85",
args: [null, false],
},
],
},
{
name: "To Base85 (Z85 (ZeroMQ)): Hello, World!",
input: "Hello, World!",
expectedOutput: "nm2QNz.92jz5PV8aP",
recipeConfig: [
{
op: "To Base85",
args: ["0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#", false],
},
],
},
{
name: "From Base85 (Standard): nothing",
input: "",
expectedOutput: "",
recipeConfig: [
{
op: "From Base85",
args: [null, false],
},
],
},
{
name: "From Base85 (Standard): Hello, World!",
input: "87cURD_*#4DfTZ)+T",
expectedOutput: "Hello, World!",
recipeConfig: [
{
op: "From Base85",
args: [null, false],
},
],
},
{
name: "From Base85 (Standard): UTF-8",
input: "iIdZZK;0RJK:_%SOPth^iIdNVK:1\\NOPthc",
expectedOutput: "ნუ პანიკას",
recipeConfig: [
{
op: "From Base85",
args: [null, false],
},
],
},
]);