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
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
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
19 <script type="text/javascript">
24 module('011_smart_tabs');
27 'the words in this paragraph',
28 'should look like they are',
29 'evenly spaced between columns'
32 'the words in this paragraph',
33 'should look out of whack',
34 'because smart tabs are disabled'
40 s = encodeURIComponent(s).replace(/%C2%A0/g, '%20');
41 return unescape(s).replace(/\s+$/g, '');
44 test('default tab size is 4', function()
46 $sh = $('#sh_011_smart_tabs_a');
52 $sh.find('.code .line').each(function(index)
54 var s1 = fixSpaces($(this).text()),
55 s2 = fixSpaces(evenLines[index])
58 equal(s1, s2, 'Line ' + index);
62 test('tab size changed to 8', function()
64 $sh = $('#sh_011_smart_tabs_b');
70 $sh.find('.code .line').each(function(index)
72 var s1 = fixSpaces($(this).text()),
73 s2 = fixSpaces(evenLines[index])
76 equal(s1, s2, 'Line ' + index);
80 test('smart tabs are off', function()
82 $sh = $('#sh_011_smart_tabs_c');
88 $sh.find('.code .line').each(function(index)
90 var s1 = fixSpaces($(this).text()),
91 s2 = fixSpaces(unevenLines[index])
94 equal(s1, s2, 'Line ' + index);