/**
  * Libedit being a BSD library,
  * it doesn't support non-unix line separators.
  */
 public function testLinebreaksSupport()
 {
     $readline = new Libedit($this->historyFile);
     file_put_contents($this->historyFile, "foo\rbar\nbaz\r\nw00t", FILE_APPEND);
     $this->assertEquals(array("foo\rbar", "baz\r", 'w00t'), $readline->listHistory());
     $readline->clearHistory();
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function clearHistory()
 {
     $this->history = array();
     return parent::clearHistory();
 }