diff options
author | JinweiClarkChao <[email protected]> | 2014-08-22 17:23:02 +0800 |
---|---|---|
committer | Jinwei Zhao <[email protected]> | 2017-01-13 15:07:42 +0800 |
commit | 80255411ee7040e0cebbf6b05d2ce323f6f2596e (patch) | |
tree | 295b0ef6c85e7cb091b63719ab041596879690fa /Back/Blocks/syntax/tests/cases/006_pad_line_numbers.html | |
parent | 13be3d058713e1467ffc573a90cc694b80526135 (diff) | |
download | jinwei.me-80255411ee7040e0cebbf6b05d2ce323f6f2596e.tar.gz |
backup
Diffstat (limited to 'Back/Blocks/syntax/tests/cases/006_pad_line_numbers.html')
-rw-r--r-- | Back/Blocks/syntax/tests/cases/006_pad_line_numbers.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Back/Blocks/syntax/tests/cases/006_pad_line_numbers.html b/Back/Blocks/syntax/tests/cases/006_pad_line_numbers.html new file mode 100644 index 0000000..8ebdd55 --- /dev/null +++ b/Back/Blocks/syntax/tests/cases/006_pad_line_numbers.html | |||
@@ -0,0 +1,39 @@ | |||
1 | <pre id="sh_006_pad_line_numbers" class="brush: java; pad-line-numbers: true"> | ||
2 | /** | ||
3 | * Returns an Image object that can then be painted on the screen. | ||
4 | * The url argument must specify an absolute {@link URL}. The name | ||
5 | * argument is a specifier that is relative to the url argument. | ||
6 | * | ||
7 | * @param url an absolute URL giving the base location of the image | ||
8 | * @param name the location of the image, relative to the url argument | ||
9 | * @return the image at the specified URL | ||
10 | * @see Image | ||
11 | */ | ||
12 | </pre> | ||
13 | |||
14 | <script type="text/javascript"> | ||
15 | queue(function() | ||
16 | { | ||
17 | var $sh; | ||
18 | |||
19 | module('006_pad_line_numbers'); | ||
20 | |||
21 | test('check that line numbers are padded with zeroes', function() | ||
22 | { | ||
23 | $sh = $('#sh_006_pad_line_numbers'); | ||
24 | |||
25 | ok_sh($sh); | ||
26 | ok_toolbar($sh); | ||
27 | ok_gutter($sh); | ||
28 | ok_code($sh); | ||
29 | |||
30 | $sh.find('.gutter > .line').each(function(index) | ||
31 | { | ||
32 | var text = $(this).text(); | ||
33 | |||
34 | if (parseInt(text) < 10) | ||
35 | ok(text.charAt(0) == '0', 'Line ' + index + ' has leading zero: ' + text); | ||
36 | }); | ||
37 | }); | ||
38 | }); | ||
39 | </script> | ||