Package net.sf.jabref.bst

Examples of net.sf.jabref.bst.VM.run()


    Vector<BibtexEntry> v = new Vector<BibtexEntry>();
    v.add(t1BibtexEntry());

    v.add(bibtexString2BibtexEntry("@article{test, title=\"BLA\"}"));

    vm.run(v);

    assertEquals(2, vm.getStack().size());

    String s1 = (String) vm.getStack().pop();
    String s2 = (String) vm.getStack().pop();
View Full Code Here


      "");//

    Vector<BibtexEntry> v = new Vector<BibtexEntry>();
    v.add(t1BibtexEntry());

    vm.run(v);

    assertTrue(vm.getIntegers().containsKey("longest.label.width"));
    assertEquals("\\begin{thebibliography}{1}", vm.getStack().pop());
  }
View Full Code Here

  public void testVMSwap() throws RecognitionException, IOException {

    VM vm = new VM("FUNCTION {a}{ #3 \"Hallo\" swap$ } EXECUTE { a }");

    Vector<BibtexEntry> v = new Vector<BibtexEntry>();
    vm.run(v);

    assertEquals(2, vm.getStack().size());
    assertEquals(new Integer(3), vm.getStack().pop());
    assertEquals("Hallo", vm.getStack().pop());
  }
View Full Code Here

  public void testHypthenatedName() throws RecognitionException, IOException {
    VM vm = new VM(new File("src/tests/net/sf/jabref/bst/abbrv.bst"));
    Vector<BibtexEntry> v = new Vector<BibtexEntry>();
    v.add(bibtexString2BibtexEntry("@article{canh05, author = \"Jean-Paul Sartre\" }"));
    assertTrue(vm.run(v).indexOf("J.-P. Sartre") != -1);
  }

  public BibtexEntry t1BibtexEntry() throws IOException {
    return bibtexString2BibtexEntry(t1BibtexString());
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.