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/010_highlight.html
parent7e473afdca63f0ceed5d895c3be3b43f213ca136 (diff)
downloadjinwei.me-dbcebe1def5c355120c61b575390d1d9ac355f67.tar.gz
clear up
Diffstat (limited to 'Code/Blocks/syntax/tests/cases/010_highlight.html')
-rw-r--r--Code/Blocks/syntax/tests/cases/010_highlight.html70
1 files changed, 0 insertions, 70 deletions
diff --git a/Code/Blocks/syntax/tests/cases/010_highlight.html b/Code/Blocks/syntax/tests/cases/010_highlight.html
deleted file mode 100644
index 64b6613..0000000
--- a/Code/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)