Show More
@@ -87,6 +87,18 b' def test_history():' | |||||
87 | # Check get_hist_search |
|
87 | # Check get_hist_search | |
88 | gothist = ip.history_manager.search("*test*") |
|
88 | gothist = ip.history_manager.search("*test*") | |
89 | nt.assert_equal(list(gothist), [(1,2,hist[1])] ) |
|
89 | nt.assert_equal(list(gothist), [(1,2,hist[1])] ) | |
|
90 | gothist = ip.history_manager.search("*=*") | |||
|
91 | nt.assert_equal(list(gothist), | |||
|
92 | [(1, 1, hist[0]), | |||
|
93 | (1, 2, hist[1]), | |||
|
94 | (1, 3, hist[2]), | |||
|
95 | (2, 1, newcmds[0]), | |||
|
96 | (2, 3, newcmds[2])]) | |||
|
97 | gothist = ip.history_manager.search("*=*", n=3) | |||
|
98 | nt.assert_equal(list(gothist), | |||
|
99 | [(1, 3, hist[2]), | |||
|
100 | (2, 1, newcmds[0]), | |||
|
101 | (2, 3, newcmds[2])]) | |||
90 | gothist = ip.history_manager.search("b*", output=True) |
|
102 | gothist = ip.history_manager.search("b*", output=True) | |
91 | nt.assert_equal(list(gothist), [(1,3,(hist[2],"spam"))] ) |
|
103 | nt.assert_equal(list(gothist), [(1,3,(hist[2],"spam"))] ) | |
92 |
|
104 |
General Comments 0
You need to be logged in to leave comments.
Login now