1   /**
2    *  MicroEmulator
3    *  Copyright (C) 2006-2008 Bartek Teodorczyk <barteo@barteo.net>
4    *  Copyright (C) 2006-2008 Vlad Skarzhevskyy
5    *
6    *  It is licensed under the following two licenses as alternatives:
7    *    1. GNU Lesser General Public License (the "LGPL") version 2.1 or any newer version
8    *    2. Apache License (the "AL") Version 2.0
9    *
10   *  You may not use this file except in compliance with at least one of
11   *  the above two licenses.
12   *
13   *  You may obtain a copy of the LGPL at
14   *      http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt
15   *
16   *  You may obtain a copy of the AL at
17   *      http://www.apache.org/licenses/LICENSE-2.0
18   *
19   *  Unless required by applicable law or agreed to in writing, software
20   *  distributed under the License is distributed on an "AS IS" BASIS,
21   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22   *  See the LGPL or the AL for the specific language governing permissions and
23   *  limitations.
24   *
25   *  @version $Id: FileRecordStoreManagerTest.java 1691 2008-04-11 04:58:21Z vlads $
26   */
27  package org.microemu.app.util;
28  
29  import junit.framework.TestCase;
30  
31  /**
32   * @author vlads
33   * 
34   */
35  public class FileRecordStoreManagerTest extends TestCase {
36  
37  	private void validate(String name) {
38  		String fileName = FileRecordStoreManager.recordStoreName2FileName(name);
39  		String name2 = FileRecordStoreManager.fileName2RecordStoreName(fileName);
40  		assertEquals("recordStoreName", name, name2);
41  		System.out.println("recordStoreName[" + name + "]->fileName[" + fileName + "]");
42  	}
43  
44  	public void testSpecialCharacter() {
45  		validate("c:1");
46  		validate("c|2");
47  		validate("c/3");
48  		validate("c\\4");
49  		validate("c\\\\5");
50  		validate("c/r:7");
51  	}
52  
53  }