test/langtools/jdk/javadoc/tool/CheckResourceKeys.java
changeset 48543 7067fe4e054e
parent 47216 71c04702a3d5
child 50240 b9c483223a91
equal deleted inserted replaced
48542:19effb7970bc 48543:7067fe4e054e
     1 /*
     1 /*
     2  * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2010, 2018, 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.
   115 
   115 
   116         return (errors == 0);
   116         return (errors == 0);
   117     }
   117     }
   118 
   118 
   119     void usageTests(boolean xflag) {
   119     void usageTests(boolean xflag) {
   120         String[] argarray = { xflag ? "-X" : "-help" };
   120         String[] argarray = { xflag ? "-X" : "--help" };
   121         StringWriter sw = new StringWriter();
   121         StringWriter sw = new StringWriter();
   122         PrintWriter pw = new PrintWriter(sw);
   122         PrintWriter pw = new PrintWriter(sw);
   123         if (jdk.javadoc.internal.tool.Main.execute(argarray, pw) == 0) {
   123         if (jdk.javadoc.internal.tool.Main.execute(argarray, pw) == 0) {
   124             pw.flush();
   124             pw.flush();
   125             String s = sw.toString();
   125             String s = sw.toString();