~telemachus/Exercism

ref: 392885548959505a17ef8731a06b37a972bdd1df Exercism/go/atbash-cipher/cases_test.go -rw-r--r-- 1.1 KiB
39288554Peter Aronoff Atbash cipher 6 months ago
                                                                                
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
package atbash

// Source: exercism/problem-specifications
// Commit: dda678b atbash-cipher: Apply new "input" policy
// Problem Specifications Version: 1.1.0

type atbashTest struct {
	s        string
	expected string
}

var tests = []atbashTest{
	{
		s:        "yes",
		expected: "bvh",
	},
	{
		s:        "no",
		expected: "ml",
	},
	{
		s:        "OMG",
		expected: "lnt",
	},
	{
		s:        "O M G",
		expected: "lnt",
	},
	{
		s:        "mindblowingly",
		expected: "nrmwy oldrm tob",
	},
	{
		s:        "Testing,1 2 3, testing.",
		expected: "gvhgr mt123 gvhgr mt",
	},
	{
		s:        "Truth is fiction.",
		expected: "gifgs rhurx grlm",
	},
	{
		s:        "The quick brown fox jumps over the lazy dog.",
		expected: "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt",
	},
	{
		s:        "exercism",
		expected: "vcvix rhn",
	},
	{
		s:        "anobstacleisoftenasteppingstone",
		expected: "zmlyh gzxov rhlug vmzhg vkkrm thglm v",
	},
	{
		s:        "testing123testing",
		expected: "gvhgr mt123 gvhgr mt",
	},
	{
		s:        "thequickbrownfoxjumpsoverthelazydog",
		expected: "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt",
	},
}