~ubuntu-branches/ubuntu/natty/jabref/natty

« back to all changes in this revision

Viewing changes to src/java/tests/net/sf/jabref/export/layout/format/RemoveTildeTest.java

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann
  • Date: 2007-11-16 18:38:18 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071116183818-20x934jdsju14618
Tags: 2.3-2
* Add /usr/lib/jvm/java-7-icedtea to wrapper script. Doesn't work on
  Debian yet but helps Ubuntu users (TODO: add dependency on
  icedtea-java7-jre (not yet in Debian)).
* Reformat wrapper script.
* debian/rules: re-arrange targets and their dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package tests.net.sf.jabref.export.layout.format;
 
2
 
 
3
import junit.framework.TestCase;
 
4
import net.sf.jabref.export.layout.LayoutFormatter;
 
5
import net.sf.jabref.export.layout.format.RemoveTilde;
 
6
 
 
7
public class RemoveTildeTest extends TestCase {
 
8
 
 
9
        public void testFormatString() {
 
10
 
 
11
                LayoutFormatter l = new RemoveTilde();
 
12
 
 
13
                assertEquals("", l.format(""));
 
14
                
 
15
                assertEquals("simple", l.format("simple"));
 
16
                
 
17
                assertEquals(" ", l.format("~"));
 
18
                
 
19
                assertEquals("   ", l.format("~~~"));
 
20
                
 
21
                assertEquals(" \\~ ", l.format("~\\~~"));
 
22
                
 
23
                assertEquals("\\\\ ", l.format("\\\\~"));
 
24
                
 
25
                assertEquals("Doe Joe and Jane, M. and Kamp, J. A.", l
 
26
                                .format("Doe Joe and Jane, M. and Kamp, J.~A."));
 
27
                
 
28
                assertEquals("T\\~olkien, J. R. R.", l
 
29
                                .format("T\\~olkien, J.~R.~R."));
 
30
        }
 
31
}