##// END OF EJS Templates
Add a test for the purge extension
Emanuele Aina -
r4145:2ebdd33f default
parent child Browse files
Show More
@@ -0,0 +1,57
1 #!/bin/sh
2
3 cat <<EOF >> $HGRCPATH
4 [extensions]
5 purge=${TESTDIR}/../contrib/purge/purge.py
6 EOF
7
8 echo % init
9 hg init t
10 cd t
11
12 echo % setup
13 echo r1 > r1
14 hg ci -qAmr1 -d'0 0'
15 mkdir directory
16 echo r2 > directory/r2
17 hg ci -qAmr2 -d'1 0'
18 echo 'ignored' > .hgignore
19 hg ci -qAmr3 -d'2 0'
20
21 echo % delete an empty directory
22 mkdir empty_dir
23 hg purge -p
24 hg purge -v
25 ls
26
27 echo % delete an untracked directory
28 mkdir untracked_dir
29 touch untracked_dir/untracked_file1
30 touch untracked_dir/untracked_file2
31 hg purge -p
32 hg purge -v
33 ls
34
35 echo % delete an untracked file
36 touch untracked_file
37 hg purge -p
38 hg purge -v
39 ls
40
41 echo % delete an untracked file in a tracked directory
42 touch directory/untracked_file
43 hg purge -p
44 hg purge -v
45 ls
46
47 echo % delete nested directories
48 mkdir -p untracked_directory/nested_directory
49 hg purge -p
50 hg purge -v
51 ls
52
53 echo % delete ignored files
54 touch ignored
55 hg purge -p
56 hg purge -v
57 ls
@@ -0,0 +1,36
1 % init
2 % setup
3 % delete an empty directory
4 empty_dir
5 Removing directory empty_dir
6 directory
7 r1
8 % delete an untracked directory
9 untracked_dir/untracked_file1
10 untracked_dir/untracked_file2
11 Removing file untracked_dir/untracked_file1
12 Removing file untracked_dir/untracked_file2
13 Removing directory untracked_dir
14 directory
15 r1
16 % delete an untracked file
17 untracked_file
18 Removing file untracked_file
19 directory
20 r1
21 % delete an untracked file in a tracked directory
22 directory/untracked_file
23 Removing file directory/untracked_file
24 directory
25 r1
26 % delete nested directories
27 untracked_directory/nested_directory
28 Removing directory untracked_directory/nested_directory
29 Removing directory untracked_directory
30 directory
31 r1
32 % delete ignored files
33 ignored
34 Removing file ignored
35 directory
36 r1
General Comments 0
You need to be logged in to leave comments. Login now