@@ -0,0 +1,2623 @@
+/*%0D%0A Copyright 2006 Paul Zepernick%0D%0A%0D%0A Licensed under the Apache License, Version 2.0 (the %22License%22); %0D%0A you may not use this file except in compliance with the License. %0D%0A You may obtain a copy of the License at %0D%0A%0D%0A http://www.apache.org/licenses/LICENSE-2.0 %0D%0A%0D%0A Unless required by applicable law or agreed to in writing, software distributed %0D%0A under the License is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR %0D%0A CONDITIONS OF ANY KIND, either express or implied. See the License for %0D%0A the specific language governing permissions and limitations under the License.  %0D%0A */%0D%0Apackage net.sf.pzfilereader.parserutils;%0D%0A%0D%0Aimport net.sf.pzfilereader.util.ParserUtils;%0D%0Aimport junit.framework.TestCase;%0D%0A%0D%0A/**%0D%0A * Tests the functionality of the left trim in the ParserUtils%0D%0A *  %0D%0A * @author paul zepernick%0D%0A */%0D%0Apublic class LTrimTest extends TestCase%7B%0D%0A    %0D%0A    %0D%0A    %0D%0A    /**%0D%0A     * Make sure all spaces are properly removed from the front of the String%0D%0A     *%0D%0A     */%0D%0A    public void testTrimLeadingSpaces()%7B%0D%0A        final String testS = %22     RemoveAllSpacesFromMe%22;        %0D%0A        assertEquals(true , ParserUtils.lTrim(testS).indexOf(%22 %22) == -1);        %0D%0A    %7D%0D%0A    %0D%0A    /**%0D%0A     * Make sure all spaces are properly removed from the front of the String%0D%0A     * leaving the trailing spaces at the end%0D%0A     *%0D%0A     */%0D%0A    public void testTrimLeadingSpacesWithTrailingSpaces()%7B%0D%0A        final String testS = %22     RemoveAllSpacesFromMe     %22;%0D%0A        final String tResult = ParserUtils.lTrim(testS);%0D%0A        assertEquals(true , !tResult.startsWith(%22 %22) && tResult.endsWith(%22 %22));        %0D%0A    %7D%0D%0A    %0D%0A    %0D%0A    /**%0D%0A     * Make sure all TAB chars are properly removed from the front of the String%0D%0A     * leaving the trailing spaces at the end%0D%0A     *%0D%0A     */%0D%0A    public void testTrimLeadingTabs()%7B%0D%0A        final String testS = %22%5Ct%5Ct%5CtRemoveAllSpacesFromMe     %22;%0D%0A        final String tResult = ParserUtils.lTrim(testS);%0D%0A        assertEquals(true , !tResult.startsWith(%22%5Ct%22) && tResult.endsWith(%22 %22));        %0D%0A    %7D%0D%0A    %0D%0A    %0D%0A    /**%0D%0A     * Make sure all TAB chars are properly removed from the front of the String%0D%0A     * leaving the trailing spaces at the end%0D%0A     *%0D%0A     */%0D%0A    public void testKeepLeadingTabs()%7B%0D%0A        final String testS = %22     %5Ct%5Ct%5CtRemoveAllSpacesFromMe     %22;%0D%0A        final String tResult = ParserUtils.lTrimKeepTabs(testS);%0D%0A        assertEquals(true , !tResult.startsWith(%22%5Ct%22) && tResult.endsWith(%22 %22));        %0D%0A    %7D%0D%0A    %0D%0A    %0D%0A    public static void main(final String%5B%5D args) %7B%0D%0A        junit.textui.TestRunner.run(LTrimTest.class);%0D%0A    %7D%0D%0A%7D%0D%0A

Test cases for lTrim and lTrimKeepTabs