conor 2002/06/13 18:33:31 Added: jrcs/src/test/org/apache/commons/jrcs/rcs ParsingTest.java idchar.testfile make_idchar_test.sh Log: created a test for this problem added a test RCS file, with tags with lots of graphic characters shell script for creating idchar.testfile Submitted By: Matt Quail <[EMAIL PROTECTED]> Revision Changes Path 1.1 jakarta-commons-sandbox/jrcs/src/test/org/apache/commons/jrcs/rcs/ParsingTest.java Index: ParsingTest.java =================================================================== /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache Maven" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache", * "Apache Maven", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.commons.jrcs.rcs; import junit.framework.TestCase; import java.io.InputStream; /** * @author Matt Quail (matt_quail AT yahoo DOT com) */ public class ParsingTest extends TestCase { public ParsingTest(String testName) { super(testName); } /** * Test to check that all the parser */ public void testIDCHAR() throws Exception { InputStream is = getClass().getResourceAsStream("idchar.testfile"); System.out.println("\n\n basedir=" + System.getProperty("basedir")); assertNotNull(is); Archive ar = new Archive("idchar_test.txt,v", is); } } 1.1 jakarta-commons-sandbox/jrcs/src/test/org/apache/commons/jrcs/rcs/idchar.testfile Index: idchar.testfile =================================================================== head 1.1; access; symbols TILDE~NAME:1.1 LCB}NAME:1.1 BAR|NAME:1.1 RCBR{NAME:1.1 TICK`NAME:1.1 CARAT^NAME:1.1 LSBR]NAME:1.1 SLOSH\NAME:1.1 RSBR[NAME:1.1 QUESTION?NAME:1.1 LABR>NAME:1.1 EQUALS=NAME:1.1 RABR<NAME:1.1 SLASH/NAME:1.1 MINUS-NAME:1.1 PLUS+NAME:1.1 STAR*NAME:1.1 LRBR)NAME:1.1 RRBR(NAME:1.1 SQUOTE'NAME:1.1 AMP&NAME:1.1 PERCENT%NAME:1.1 HASH#NAME:1.1 DQUOTE"NAME:1.1 BANG!NAME:1.1 NAME1NAME:1.1 1NAME:1.1 NAME1:1.1 UNDERSCORE_NAME:1.1 MIXEDname:1.1 lowername:1.1 SIMPLENAME:1.1; locks; strict; comment @# @; 1.1 date 2002.04.18.05.50.07; author matt; state Exp; branches; next ; desc @description @ 1.1 log @blah @ text @first version @ 1.1 jakarta-commons-sandbox/jrcs/src/test/org/apache/commons/jrcs/rcs/make_idchar_test.sh Index: make_idchar_test.sh =================================================================== #!/bin/bash fn=idchar.testfile rm -f $fn $fn,v echo "first version" > $fn echo "description" | ci -m"blah" $fn names="SIMPLENAME lowername MIXEDname UNDERSCORE_NAME"\ " NAME1 1NAME NAME1NAME"\ " BANG!NAME DQUOTE\"NAME HASH#NAME"\ " PERCENT%NAME AMP&NAME SQUOTE'NAME"\ " RRBR(NAME LRBR)NAME STAR*NAME PLUS+NAME"\ " MINUS-NAME SLASH/NAME"\ " RABR<NAME EQUALS=NAME LABR>NAME QUESTION?NAME"\ " RSBR[NAME SLOSH\\NAME LSBR]NAME CARAT^NAME TICK\`NAME"\ " RCBR{NAME BAR|NAME LCB}NAME TILDE~NAME" for i in $names ; do rcs -n$i:1.1 $fn done mv $fn,v $fn
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>