aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinweiClarkChao <[email protected]>2014-08-22 17:23:02 +0800
committerJinwei Zhao <[email protected]>2017-01-13 15:07:42 +0800
commit80255411ee7040e0cebbf6b05d2ce323f6f2596e (patch)
tree295b0ef6c85e7cb091b63719ab041596879690fa /Blocks/syntax/tests/cases/010_highlight.html
parent13be3d058713e1467ffc573a90cc694b80526135 (diff)
downloadjinwei.me-80255411ee7040e0cebbf6b05d2ce323f6f2596e.tar.gz
backup
Diffstat (limited to 'Blocks/syntax/tests/cases/010_highlight.html')
-rw-r--r--Blocks/syntax/tests/cases/010_highlight.html70
1 files changed, 0 insertions, 70 deletions
diff --git a/Blocks/syntax/tests/cases/010_highlight.html b/Blocks/syntax/tests/cases/010_highlight.html
deleted file mode 100644
index 64b6613..0000000
--- a/Blocks/syntax/tests/cases/010_highlight.html
+++ /dev/null
@@ -1,70 +0,0 @@
1<pre id="sh_010_highlight_a" class="brush: groovy; highlight: 2">
2 public function validateStrongPassword(password:String):Boolean
3 {
4 if (password == null || password.length <= 0)
5 {
6 return false;
7 }
8
9 return STRONG_PASSWORD_PATTERN.test(password);
10 }
11</pre>
12<script id="sh_010_highlight_b" type="syntaxhighlighter" class="brush: as3; highlight: [2, 4, 12]"><![CDATA[
13 /**
14 * Checks a password and returns a value indicating whether the password is a "strong"
15 * password. The criteria for a strong password are:
16 *
17 * <ul>
18 * <li>Minimum 8 characters</li>
19 * <li>Maxmium 32 characters</li>
20 * <li>Contains at least one lowercase letter</li>
21 * <li>Contains at least one uppercase letter</li>
22 * <li>Contains at least one number or symbol character</li>
23 * </ul>
24 *
25 * @param password The password to check
26 *
27 * @return A value indicating whether the password is a strong password (<code>true</code>)
28 * or not (<code>false</code>).
29 */
30 public function validateStrongPassword(password:String):Boolean
31 {
32 if (password == null || password.length <= 0)
33 {
34 return false;
35 }
36
37 return STRONG_PASSWORD_PATTERN.test(password);
38 }
39]]></script>
40
41<script type="text/javascript">
42queue(function()
43{
44 var $sh;
45
46 module('010_highlight');
47
48 test('one highlighted line', function()
49 {
50 $sh = $('#sh_010_highlight_a');
51
52 ok_sh($sh);
53 ok_toolbar($sh);
54 ok_code($sh);
55 ok($sh.find('.gutter .number2').is('.highlighted'), 'Line 2 is highlighted');
56 });
57
58 test('multiple highlighted lines', function()
59 {
60 $sh = $('#sh_010_highlight_b');
61
62 ok_sh($sh);
63 ok_toolbar($sh);
64 ok_code($sh);
65 ok($sh.find('.gutter .number2').is('.highlighted'), 'Line 2 is highlighted');
66 ok($sh.find('.gutter .number4').is('.highlighted'), 'Line 4 is highlighted');
67 ok($sh.find('.gutter .number12').is('.highlighted'), 'Line 12 is highlighted');
68 });
69});
70</script>
Powered by cgit v1.2.3 (git 2.41.0)