Fossil

Check-in [2350b068]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add more tags manifest test cases. Check the manifest.tags contents updates on tagging, commit and switching branches. Tests pass successfully on OS X.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | jan-manifest-tags
Files: files | file ages | folders
SHA1:2350b0681eaa9397cecfca5bfa32be5cf28638ab
User & Date: jan 2016-08-06 16:20:31
Context
2016-08-08
14:42
Fix an unused variable and add a header comment to get_checkin_taglist(). check-in: 6c62828b user: drh tags: jan-manifest-tags
2016-08-06
16:20
Add more tags manifest test cases. Check the manifest.tags contents updates on tagging, commit and switching branches. Tests pass successfully on OS X. check-in: 2350b068 user: jan tags: jan-manifest-tags
2016-08-05
00:46
Add a basic set of tests for the manifest property, including minimal coverage of the existance of the tags manifest. This can and should be extended to cover interesting content for the tags manifest, and likely should be extended to cover lots more corner cases. These new tests pass on Windows, but should be tried on at least one unix-like platform. check-in: c33f02de user: rberteig tags: jan-manifest-tags
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/set-manifest.test.

13
14
15
16
17
18
19













20
21
22
23
24
25
26
..
80
81
82
83
84
85
86
87
88































89
#   drh@hwaci.com
#   http://www.hwaci.com/drh/
#
############################################################################
#
# Test manifest setting
#














# We need a respository, so let it have one.
test_setup

#### Verify classic behavior of the manifest setting

# Setting is off by default, and there are no extra files.
................................................................................
    test "set-manifest-5-$v-f-$f" {[file isfile $f]}
  }
}

# Quick check for tags applied in trunk
test_file_contents "set-manifest-6" "manifest.tags" "branch=trunk\ntrunk\n"

# TODO: check content of manifest.tags file under more conditions
































test_cleanup







>
>
>
>
>
>
>
>
>
>
>
>
>







 







<

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
..
93
94
95
96
97
98
99

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#   drh@hwaci.com
#   http://www.hwaci.com/drh/
#
############################################################################
#
# Test manifest setting
#

proc file_contains {fname match} {
  set fp [open $fname r]
  set contents [read $fp]
  close $fp
  set lines [split $contents "\n"]
  foreach line $lines {
    if {[regexp $match $line]} {
      return 1
    }
  }
  return 0
}

# We need a respository, so let it have one.
test_setup

#### Verify classic behavior of the manifest setting

# Setting is off by default, and there are no extra files.
................................................................................
    test "set-manifest-5-$v-f-$f" {[file isfile $f]}
  }
}

# Quick check for tags applied in trunk
test_file_contents "set-manifest-6" "manifest.tags" "branch=trunk\ntrunk\n"



##### Test manifest.tags file content updates after commits

# Explicitly set manifest.tags mode
fossil set manifest t
test "set-manifest-7-1" {[file isfile manifest.tags]}

# Add a tag and make sure it appears in manifest.tags
fossil tag add manifest-7-tag-1 tip
test "set-manifest-7-2" {[file_contains "manifest.tags" "^manifest-7-tag-1$"]}

# Add a file and make sure tag has disappeared from manifest.tags
write_file file1 "file1 contents"
fossil add file1
fossil commit -m "Added file1."
test "set-manifest-7-3" {![file_contains "manifest.tags" "^manifest-7-tag-1$"]}

# Add new tag and check that it is in manifest.tags
fossil tag add manifest-7-tag-2 tip
test "set-manifest-7-4" {[file_contains "manifest.tags" "^manifest-7-tag-2$"]}


##### Tags manifest branch= updates

# Add file, create new branch on commit and check that
# manifest.tags has been updated appropriately
write_file file3 "file3 contents"
fossil add file3
fossil commit -m "Added file3." --branch manifest-8-branch
test "set-manifest-8" {[file_contains "manifest.tags" "^branch=manifest-8-branch$"]}


test_cleanup