equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
40 * It reads each file, complete with newlines, into a string to easily |
40 * It reads each file, complete with newlines, into a string to easily |
41 * find strings that contain newlines. |
41 * find strings that contain newlines. |
42 */ |
42 */ |
43 public class AuthorDD |
43 public class AuthorDD |
44 { |
44 { |
|
45 |
|
46 protected static final String NL = System.getProperty("line.separator"); |
|
47 |
45 private static final String BUGID = "4651598"; |
48 private static final String BUGID = "4651598"; |
46 private static final String BUGNAME = "AuthorDD"; |
49 private static final String BUGNAME = "AuthorDD"; |
47 private static final String FS = System.getProperty("file.separator"); |
|
48 private static final String PS = System.getProperty("path.separator"); |
|
49 private static final String NL = System.getProperty("line.separator"); |
|
50 |
50 |
51 // Subtest number. Needed because runResultsOnHTML is run twice, and subtestNum |
51 // Subtest number. Needed because runResultsOnHTML is run twice, and subtestNum |
52 // should increment across subtest runs. |
52 // should increment across subtest runs. |
53 public static int subtestNum = 0; |
53 public static int subtestNum = 0; |
54 public static int numSubtestsPassed = 0; |
54 public static int numSubtestsPassed = 0; |
84 */ |
84 */ |
85 private static final String[][] testArray = { |
85 private static final String[][] testArray = { |
86 |
86 |
87 // Test single @since tag: |
87 // Test single @since tag: |
88 |
88 |
89 { "<dt><span class=\"simpleTagLabel\">Since:</span></dt>"+NL+"<dd>JDK 1.0</dd>", |
89 { "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
90 BUGID + FS + "p1" + FS + "C1.html" }, |
90 "<dd>JDK 1.0</dd>", |
|
91 BUGID + "/p1/C1.html" }, |
91 |
92 |
92 // Test multiple @author tags: |
93 // Test multiple @author tags: |
93 |
94 |
94 { "<dt><span class=\"simpleTagLabel\">Author:</span></dt>"+NL+"<dd>Doug Kramer, Jamie, Neal</dd>", |
95 { "<dt><span class=\"simpleTagLabel\">Author:</span></dt>\n" + |
95 BUGID + FS + "p1" + FS + "C1.html" }, |
96 "<dd>Doug Kramer, Jamie, Neal</dd>", |
|
97 BUGID + "/p1/C1.html" }, |
96 |
98 |
97 }; |
99 }; |
98 |
100 |
99 public static void runTestsOnHTML(String[][] testArray) { |
101 public static void runTestsOnHTML(String[][] testArray) { |
100 |
102 |
159 return ""; |
161 return ""; |
160 } |
162 } |
161 } |
163 } |
162 |
164 |
163 public static int findString(String fileString, String stringToFind) { |
165 public static int findString(String fileString, String stringToFind) { |
164 return fileString.indexOf(stringToFind); |
166 return fileString.replace(NL, "\n").indexOf(stringToFind); |
165 } |
167 } |
166 } |
168 } |