aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinwei Zhao <[email protected]>2015-12-19 22:24:42 +0900
committerJinwei Zhao <[email protected]>2017-01-13 15:07:45 +0800
commitdbcebe1def5c355120c61b575390d1d9ac355f67 (patch)
tree70e61cc34a690c63ff80962e9ef883fe69dba6d3 /Code/Blocks/syntax/tests/cases/011_smart_tabs.html
parent7e473afdca63f0ceed5d895c3be3b43f213ca136 (diff)
downloadjinwei.me-dbcebe1def5c355120c61b575390d1d9ac355f67.tar.gz
clear up
Diffstat (limited to 'Code/Blocks/syntax/tests/cases/011_smart_tabs.html')
-rw-r--r--Code/Blocks/syntax/tests/cases/011_smart_tabs.html98
1 files changed, 0 insertions, 98 deletions
diff --git a/Code/Blocks/syntax/tests/cases/011_smart_tabs.html b/Code/Blocks/syntax/tests/cases/011_smart_tabs.html
deleted file mode 100644
index d6d62fc..0000000
--- a/Code/Blocks/syntax/tests/cases/011_smart_tabs.html
+++ /dev/null
@@ -1,98 +0,0 @@
1<pre id="sh_011_smart_tabs_a" class="brush: plain;">
2 the words in this paragraph
3 should look like they are
4 evenly spaced between columns
5</pre>
6
7<pre id="sh_011_smart_tabs_b" class="brush: plain; tab-size: 8;">
8 the words in this paragraph
9 should look like they are
10 evenly spaced between columns
11</pre>
12
13<pre id="sh_011_smart_tabs_c" class="brush: plain; smart-tabs: false">
14 the words in this paragraph
15 should look out of whack
16 because smart tabs are disabled
17</pre>
18
19<script type="text/javascript">
20queue(function()
21{
22 var $sh;
23
24 module('011_smart_tabs');
25
26 var evenLines = [
27 'the words in this paragraph',
28 'should look like they are',
29 'evenly spaced between columns'
30 ],
31 unevenLines = [
32 'the words in this paragraph',
33 'should look out of whack',
34 'because smart tabs are disabled'
35 ]
36 ;
37
38 function fixSpaces(s)
39 {
40 s = encodeURIComponent(s).replace(/%C2%A0/g, '%20');
41 return unescape(s).replace(/\s+$/g, '');
42 };
43
44 test('default tab size is 4', function()
45 {
46 $sh = $('#sh_011_smart_tabs_a');
47
48 ok_sh($sh);
49 ok_toolbar($sh);
50 ok_code($sh);
51
52 $sh.find('.code .line').each(function(index)
53 {
54 var s1 = fixSpaces($(this).text()),
55 s2 = fixSpaces(evenLines[index])
56 ;
57
58 equal(s1, s2, 'Line ' + index);
59 });
60 });
61
62 test('tab size changed to 8', function()
63 {
64 $sh = $('#sh_011_smart_tabs_b');
65
66 ok_sh($sh);
67 ok_toolbar($sh);
68 ok_code($sh);
69
70 $sh.find('.code .line').each(function(index)
71 {
72 var s1 = fixSpaces($(this).text()),
73 s2 = fixSpaces(evenLines[index])
74 ;
75
76 equal(s1, s2, 'Line ' + index);
77 });
78 });
79
80 test('smart tabs are off', function()
81 {
82 $sh = $('#sh_011_smart_tabs_c');
83
84 ok_sh($sh);
85 ok_toolbar($sh);
86 ok_code($sh);
87
88 $sh.find('.code .line').each(function(index)
89 {
90 var s1 = fixSpaces($(this).text()),
91 s2 = fixSpaces(unevenLines[index])
92 ;
93
94 equal(s1, s2, 'Line ' + index);
95 });
96 });
97});
98</script>
Powered by cgit v1.2.3 (git 2.41.0)