diakonos 0.8.7 → 0.8.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. metadata +38 -59
  2. data/CHANGELOG +0 -238
  3. data/LICENCE +0 -21
  4. data/README +0 -75
  5. data/bin/diakonos +0 -6
  6. data/diakonos-256-colour.conf +0 -102
  7. data/diakonos.conf +0 -1233
  8. data/lib/diakonos.rb +0 -618
  9. data/lib/diakonos/array.rb +0 -15
  10. data/lib/diakonos/bignum.rb +0 -9
  11. data/lib/diakonos/bookmark.rb +0 -50
  12. data/lib/diakonos/buffer-hash.rb +0 -60
  13. data/lib/diakonos/buffer-management.rb +0 -73
  14. data/lib/diakonos/buffer.rb +0 -2044
  15. data/lib/diakonos/clipboard.rb +0 -47
  16. data/lib/diakonos/config.rb +0 -304
  17. data/lib/diakonos/ctag.rb +0 -28
  18. data/lib/diakonos/display.rb +0 -288
  19. data/lib/diakonos/enumerable.rb +0 -15
  20. data/lib/diakonos/finding.rb +0 -32
  21. data/lib/diakonos/fixnum.rb +0 -17
  22. data/lib/diakonos/functions.rb +0 -1420
  23. data/lib/diakonos/grep.rb +0 -78
  24. data/lib/diakonos/hash.rb +0 -108
  25. data/lib/diakonos/help.rb +0 -92
  26. data/lib/diakonos/hooks.rb +0 -13
  27. data/lib/diakonos/interaction.rb +0 -139
  28. data/lib/diakonos/keycode.rb +0 -110
  29. data/lib/diakonos/keying.rb +0 -124
  30. data/lib/diakonos/list.rb +0 -55
  31. data/lib/diakonos/logging.rb +0 -24
  32. data/lib/diakonos/object.rb +0 -6
  33. data/lib/diakonos/readline.rb +0 -274
  34. data/lib/diakonos/regexp.rb +0 -6
  35. data/lib/diakonos/sessions.rb +0 -70
  36. data/lib/diakonos/sized-array.rb +0 -48
  37. data/lib/diakonos/string.rb +0 -326
  38. data/lib/diakonos/text-mark.rb +0 -19
  39. data/lib/diakonos/vendor/fuzzy_file_finder.rb +0 -353
  40. data/lib/diakonos/window.rb +0 -32
  41. data/test/buffer-test.rb +0 -53
  42. data/test/clipboard-test.rb +0 -70
  43. data/test/diakonos-test.rb +0 -14
  44. data/test/hash-test.rb +0 -404
  45. data/test/regexp-test.rb +0 -26
  46. data/test/sizedarray-test.rb +0 -113
  47. data/test/string-test.rb +0 -160
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'test/unit'
4
- require 'diakonos'
5
-
6
- class TC_Regexp < Test::Unit::TestCase
7
- def test_uses_bos
8
- r = /^test/
9
- assert_equal(
10
- true, r.uses_bos,
11
- "/#{r.source}/.uses_bos should be true"
12
- )
13
-
14
- r = /test/
15
- assert_equal(
16
- false, r.uses_bos,
17
- "/#{r.source}/.uses_bos should be false"
18
- )
19
-
20
- r = /t^est/
21
- assert_equal(
22
- false, r.uses_bos,
23
- "/#{r.source}/.uses_bos should be false"
24
- )
25
- end
26
- end
@@ -1,113 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'test/unit'
4
- require 'diakonos'
5
-
6
- class TC_SizedArray < Test::Unit::TestCase
7
- def test_initialize
8
- a = SizedArray.new( 2 )
9
- assert_equal( 2, a.capacity )
10
- a = SizedArray.new( 4 )
11
- assert_equal( 4, a.capacity )
12
- end
13
-
14
- def test_append
15
- a = SizedArray.new( 2 )
16
-
17
- assert_equal(
18
- [ 1 ],
19
- a << 1
20
- )
21
- assert_equal(
22
- [ 1, 2 ],
23
- a << 2
24
- )
25
- assert_equal(
26
- 1,
27
- a << 3
28
- )
29
- assert_equal(
30
- [ 2, 3 ],
31
- a
32
- )
33
- assert_equal(
34
- 2,
35
- a << 1
36
- )
37
- assert_equal(
38
- [ 3, 1 ],
39
- a
40
- )
41
- end
42
-
43
- def test_push
44
- a = SizedArray.new( 2 )
45
- b = SizedArray.new( 2 )
46
-
47
- assert_equal( a, b )
48
-
49
- a << 1
50
- b.push 1
51
- assert_equal( a, b )
52
- a << 2
53
- b.push 2
54
- assert_equal( a, b )
55
- a << 3
56
- b.push 3
57
- assert_equal( a, b )
58
- end
59
-
60
- def test_unshift
61
- a = SizedArray.new( 2 )
62
-
63
- assert_equal(
64
- [ 1 ],
65
- a.unshift( 1 )
66
- )
67
- assert_equal(
68
- [ 2, 1 ],
69
- a.unshift( 2 )
70
- )
71
- assert_equal(
72
- 1,
73
- a.unshift( 3 )
74
- )
75
- assert_equal(
76
- [ 3, 2 ],
77
- a
78
- )
79
- assert_equal(
80
- 2,
81
- a.unshift( 1 )
82
- )
83
- assert_equal(
84
- [ 1, 3 ],
85
- a
86
- )
87
- end
88
-
89
- def test_concat
90
- a = SizedArray.new( 4 )
91
-
92
- assert_equal(
93
- [ 1, 2 ],
94
- a.concat( [ 1, 2 ] )
95
- )
96
- assert_equal(
97
- [ 1, 2, 3, 4 ],
98
- a.concat( [ 3, 4 ] )
99
- )
100
- assert_equal(
101
- [ 3, 4, 5, 6 ],
102
- a.concat( [ 5, 6 ] )
103
- )
104
- assert_equal(
105
- [ 7, 8, 9, 10 ],
106
- a.concat( [ 7, 8, 9, 10 ] )
107
- )
108
- assert_equal(
109
- [ 3, 4, 5, 6 ],
110
- a.concat( [ 1, 2, 3, 4, 5, 6 ] )
111
- )
112
- end
113
- end
@@ -1,160 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'test/unit'
4
- require 'diakonos'
5
-
6
- class TC_String < Test::Unit::TestCase
7
- def test_subHome
8
- s = "/test"
9
- assert_equal(
10
- "/test",
11
- s.subHome
12
- )
13
- s = "~/test"
14
- assert_equal(
15
- "#{ENV[ 'HOME' ]}/test",
16
- s.subHome
17
- )
18
- s = "/this/is/~/test"
19
- assert_equal(
20
- "/this/is/#{ENV[ 'HOME' ]}/test",
21
- s.subHome
22
- )
23
- s = "~"
24
- assert_equal(
25
- ENV[ 'HOME' ],
26
- s.subHome
27
- )
28
- end
29
-
30
- def test_to_b
31
- assert( "true".to_b )
32
- assert( "True".to_b )
33
- assert( "TRUE".to_b )
34
- assert( "tRue".to_b )
35
- assert( "t".to_b )
36
- assert( "T".to_b )
37
- assert( "1".to_b )
38
- assert( "yes".to_b )
39
- assert( "Yes".to_b )
40
- assert( "YES".to_b )
41
- assert( "yEs".to_b )
42
- assert( "y".to_b )
43
- assert( "Y".to_b )
44
- assert( "on".to_b )
45
- assert( "On".to_b )
46
- assert( "ON".to_b )
47
- assert( "oN".to_b )
48
- assert( "+".to_b )
49
- assert_equal( false, "false".to_b )
50
- assert_equal( false, "False".to_b )
51
- assert_equal( false, "FALSE".to_b )
52
- assert_equal( false, "fALse".to_b )
53
- assert_equal( false, "f".to_b )
54
- assert_equal( false, "F".to_b )
55
- assert_equal( false, "n".to_b )
56
- assert_equal( false, "N".to_b )
57
- assert_equal( false, "x".to_b )
58
- assert_equal( false, "X".to_b )
59
- assert_equal( false, "0".to_b )
60
- assert_equal( false, "2".to_b )
61
- assert_equal( false, "no".to_b )
62
- assert_equal( false, "No".to_b )
63
- assert_equal( false, "NO".to_b )
64
- assert_equal( false, "nO".to_b )
65
- assert_equal( false, "off".to_b )
66
- assert_equal( false, "Off".to_b )
67
- assert_equal( false, "OFF".to_b )
68
- assert_equal( false, "oFf".to_b )
69
- assert_equal( false, "-".to_b )
70
- assert_equal( false, "*".to_b )
71
- assert_equal( false, "foobar".to_b )
72
- end
73
-
74
- def test_indentation_level
75
- s = "x"
76
- assert_equal( 0, s.indentation_level( 4, true ) )
77
- assert_equal( 0, s.indentation_level( 4, false ) )
78
- s = " x"
79
- assert_equal( 1, s.indentation_level( 4, true ) )
80
- assert_equal( 0, s.indentation_level( 4, false ) )
81
- s = " x"
82
- assert_equal( 1, s.indentation_level( 4, true ) )
83
- assert_equal( 1, s.indentation_level( 4, false ) )
84
- s = " x"
85
- assert_equal( 2, s.indentation_level( 4, true ) )
86
- assert_equal( 1, s.indentation_level( 4, false ) )
87
- s = " x"
88
- assert_equal( 2, s.indentation_level( 4, true ) )
89
- assert_equal( 2, s.indentation_level( 4, false ) )
90
- s = "\tx"
91
- assert_equal( 2, s.indentation_level( 4, true, 8 ) )
92
- assert_equal( 2, s.indentation_level( 4, false, 8 ) )
93
- s = "\t\tx"
94
- assert_equal( 4, s.indentation_level( 4, true, 8 ) )
95
- assert_equal( 4, s.indentation_level( 4, false, 8 ) )
96
- s = "\t x"
97
- assert_equal( 3, s.indentation_level( 4, true, 8 ) )
98
- assert_equal( 2, s.indentation_level( 4, false, 8 ) )
99
- s = "\t x"
100
- assert_equal( 3, s.indentation_level( 4, true, 8 ) )
101
- assert_equal( 3, s.indentation_level( 4, false, 8 ) )
102
- s = "\t \tx"
103
- assert_equal( 4, s.indentation_level( 4, true, 8 ) )
104
- assert_equal( 4, s.indentation_level( 4, false, 8 ) )
105
- s = "\t \t x"
106
- assert_equal( 5, s.indentation_level( 4, true, 8 ) )
107
- assert_equal( 4, s.indentation_level( 4, false, 8 ) )
108
- s = "\t \t x"
109
- assert_equal( 5, s.indentation_level( 4, true, 8 ) )
110
- assert_equal( 4, s.indentation_level( 4, false, 8 ) )
111
- s = "\t \t x"
112
- assert_equal( 5, s.indentation_level( 4, true, 8 ) )
113
- assert_equal( 5, s.indentation_level( 4, false, 8 ) )
114
- end
115
-
116
- def test_expandTabs
117
- s = " "
118
- assert_equal( s, s.expandTabs( 8 ) )
119
- s = "\t"
120
- assert_equal( " " * 8, s.expandTabs( 8 ) )
121
- s = "\t\t"
122
- assert_equal( " " * 8*2, s.expandTabs( 8 ) )
123
- s = "\t \t"
124
- assert_equal( " " * 8*2, s.expandTabs( 8 ) )
125
- s = "\t \t "
126
- assert_equal( " " * (8*2 + 2), s.expandTabs( 8 ) )
127
- s = "\t \t"
128
- assert_equal( " " * 8*3, s.expandTabs( 8 ) )
129
- s = "\t \t"
130
- assert_equal( " " * 8*3, s.expandTabs( 8 ) )
131
- end
132
-
133
- def test_group_index
134
- s = "abc def ghi"
135
- assert_equal(
136
- [ 0, "abc" ],
137
- s.group_index( /abc/ )
138
- )
139
- assert_equal(
140
- [ 4, "def" ],
141
- s.group_index( /def/ )
142
- )
143
- assert_equal(
144
- [ 1, "b" ],
145
- s.group_index( /a(b)c/ )
146
- )
147
- assert_equal(
148
- [ 1, "b" ],
149
- s.group_index( /a(b)c d(e)f/ )
150
- )
151
- assert_equal(
152
- [ nil, nil ],
153
- s.group_index( /q/ )
154
- )
155
- assert_equal(
156
- [ 3, '' ],
157
- s.group_index( /abc(q?)/ )
158
- )
159
- end
160
- end