275
275
result = self.run_bzr("status")[0]
276
276
self.assertContainsRe(result, "unknown:\n hello.txt\n")
278
self.run_bzr("add", "hello.txt")
278
self.run_bzr("add hello.txt")
279
279
result = self.run_bzr("status")[0]
280
280
self.assertContainsRe(result, "added:\n hello.txt\n")
282
self.run_bzr("commit", "-m", "added")
283
result = self.run_bzr("status", "-r", "0..1")[0]
282
self.run_bzr("commit -m added")
283
result = self.run_bzr("status -r 0..1")[0]
284
284
self.assertContainsRe(result, "added:\n hello.txt\n")
286
286
self.build_tree(['world.txt'])
287
result = self.run_bzr("status", "-r", "0")[0]
287
result = self.run_bzr("status -r 0")[0]
288
288
self.assertContainsRe(result, "added:\n hello.txt\n" \
289
289
"unknown:\n world.txt\n")
290
result2 = self.run_bzr("status", "-r", "0..")[0]
290
result2 = self.run_bzr("status -r 0..")[0]
291
291
self.assertEquals(result2, result)
293
293
def test_status_short(self):
294
294
self.run_bzr("init")
296
296
self.build_tree(['hello.txt'])
297
result = self.run_bzr("status","--short")[0]
297
result = self.run_bzr("status --short")[0]
298
298
self.assertContainsRe(result, "[?] hello.txt\n")
300
self.run_bzr("add", "hello.txt")
301
result = self.run_bzr("status","--short")[0]
300
self.run_bzr("add hello.txt")
301
result = self.run_bzr("status --short")[0]
302
302
self.assertContainsRe(result, "[+]N hello.txt\n")
304
self.run_bzr("commit", "-m", "added")
305
result = self.run_bzr("status", "--short", "-r", "0..1")[0]
304
self.run_bzr("commit -m added")
305
result = self.run_bzr("status --short -r 0..1")[0]
306
306
self.assertContainsRe(result, "[+]N hello.txt\n")
308
308
self.build_tree(['world.txt'])
309
result = self.run_bzr("status", "--short", "-r", "0")[0]
309
result = self.run_bzr("status --short -r 0")[0]
310
310
self.assertContainsRe(result, "[+]N hello.txt\n" \
311
311
"[?] world.txt\n")
312
result2 = self.run_bzr("status", "--short", "-r", "0..")[0]
312
result2 = self.run_bzr("status --short -r 0..")[0]
313
313
self.assertEquals(result2, result)
315
315
def test_status_versioned(self):
316
316
self.run_bzr("init")
318
318
self.build_tree(['hello.txt'])
319
result = self.run_bzr("status", "--versioned")[0]
319
result = self.run_bzr("status --versioned")[0]
320
320
self.assertNotContainsRe(result, "unknown:\n hello.txt\n")
322
self.run_bzr("add", "hello.txt")
323
result = self.run_bzr("status", "--versioned")[0]
322
self.run_bzr("add hello.txt")
323
result = self.run_bzr("status --versioned")[0]
324
324
self.assertContainsRe(result, "added:\n hello.txt\n")
326
self.run_bzr("commit", "-m", "added")
327
result = self.run_bzr("status", "--versioned", "-r", "0..1")[0]
326
self.run_bzr("commit -m added")
327
result = self.run_bzr("status --versioned -r 0..1")[0]
328
328
self.assertContainsRe(result, "added:\n hello.txt\n")
330
330
self.build_tree(['world.txt'])
331
result = self.run_bzr("status", "--versioned", "-r", "0")[0]
331
result = self.run_bzr("status --versioned -r 0")[0]
332
332
self.assertContainsRe(result, "added:\n hello.txt\n")
333
333
self.assertNotContainsRe(result, "unknown:\n world.txt\n")
334
result2 = self.run_bzr("status", "--versioned", "-r", "0..")[0]
334
result2 = self.run_bzr("status --versioned -r 0..")[0]
335
335
self.assertEquals(result2, result)
337
337
def assertStatusContains(self, pattern):
338
338
"""Run status, and assert it contains the given pattern"""
339
result = self.run_bzr("status", "--short")[0]
339
result = self.run_bzr("status --short")[0]
340
340
self.assertContainsRe(result, pattern)
342
342
def test_kind_change_short(self):