diff --git a/IPython/core/tests/test_history.py b/IPython/core/tests/test_history.py index a7e7425..5474da9 100644 --- a/IPython/core/tests/test_history.py +++ b/IPython/core/tests/test_history.py @@ -87,6 +87,18 @@ def test_history(): # Check get_hist_search gothist = ip.history_manager.search("*test*") nt.assert_equal(list(gothist), [(1,2,hist[1])] ) + gothist = ip.history_manager.search("*=*") + nt.assert_equal(list(gothist), + [(1, 1, hist[0]), + (1, 2, hist[1]), + (1, 3, hist[2]), + (2, 1, newcmds[0]), + (2, 3, newcmds[2])]) + gothist = ip.history_manager.search("*=*", n=3) + nt.assert_equal(list(gothist), + [(1, 3, hist[2]), + (2, 1, newcmds[0]), + (2, 3, newcmds[2])]) gothist = ip.history_manager.search("b*", output=True) nt.assert_equal(list(gothist), [(1,3,(hist[2],"spam"))] )