Debian Codegraph @

tests/hack2.tst

raw
1 #!/usr/bin/env python3
2 ## Second example from the Hacking Guide
3
4 import sys, testlifter
5
6 testlifter.verbose += sys.argv[1:].count("-v")
7 repo = testlifter.CVSRepository("hack2.repo")
8 repo.init()
9 repo.module("module")
10 co = repo.checkout("module", "hack2.checkout")
11
12 co.write("foo.c", "The quick brown fox jumped over the lazy dog.\n")
13 co.add("foo.c")
14 co.write("bar.c", "Not an obfuscated C contest entry.\n")
15 co.add("bar.c")
16 co.commit("First commit")
17
18 co.write("bar.c", "The world will little note, nor long remember...\n")
19 co.commit("Second commit")
20
21 co.write("foo.c", "And now for something completely different.\n")
22 co.write("bar.c", "One is dead, one is mad, and I have forgotten.\n")
23 co.commit("Third commit")
24
25 co.branch("alternate")
26
27 co.write("foo.c", "Ceci n'est pas un sourcefile.\n")
28 co.write("bar.c", "C'est magnifique, mais ce n'est pas la source code.\n")
29 co.commit("Fourth commit")
30
31 repo.cleanup()
32
33 # end