Paragraph extends Job implements Serializable, Cloneable { private String getScriptBody() { return getScriptBody(text); } Paragraph(Note note, JobListener listener, NoteInterpreterLoader replLoader); String getText(); void setText(String newText); String getTitle(); void setTitle(String title); void setNote(Note note); Note getNote(); String getRequiredReplName(); static String getRequiredReplName(String text); static String getScriptBody(String text); NoteInterpreterLoader getNoteReplLoader(); Interpreter getRepl(String name); List<String> completion(String buffer, int cursor); void setNoteReplLoader(NoteInterpreterLoader repls); InterpreterResult getResult(); @Override int progress(); @Override Map<String, Object> info(); Map<String, Object> getConfig(); void setConfig(Map<String, Object> config); void setReturn(InterpreterResult value, Throwable t); @Override Object clone(); final GUI settings; }
@Test public void scriptBodyWithReplName() { String text = "%spark(1234567"; assertEquals("(1234567", Paragraph.getScriptBody(text)); text = "%table 1234567"; assertEquals("1234567", Paragraph.getScriptBody(text)); }
@Test public void scriptBodyWithoutReplName() { String text = "12345678"; assertEquals(text, Paragraph.getScriptBody(text)); }