118
119
shelver.expect('Shelve 1 change(s)? [yNfq]', 'y')
120
121
self.assertFileEqual(LINES_AJ, 'tree/foo')
123
def test_shelve_deletion(self):
124
tree = self.create_shelvable_tree()
125
os.unlink('tree/foo')
126
shelver = ExpectShelver(tree, tree.basis_tree())
127
shelver.expect('Shelve removing file "foo"? [yNfq]', 'y')
128
shelver.expect('Shelve 1 change(s)? [yNfq]', 'y')
130
self.assertFileEqual(LINES_AJ, 'tree/foo')
132
def test_shelve_finish(self):
133
tree = self.create_shelvable_tree()
134
shelver = ExpectShelver(tree, tree.basis_tree())
135
shelver.expect('Shelve? [yNfq]', 'f')
136
shelver.expect('Shelve 2 change(s)? [yNfq]', 'y')
138
self.assertFileEqual(LINES_AJ, 'tree/foo')
140
def test_shelve_quit(self):
141
tree = self.create_shelvable_tree()
142
shelver = ExpectShelver(tree, tree.basis_tree())
143
shelver.expect('Shelve? [yNfq]', 'q')
144
self.assertRaises(SystemExit, shelver.run)
145
self.assertFileEqual(LINES_ZY, 'tree/foo')