Fossil

Check-in [6f42e76d]
Login

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

Overview
Comment:Add tests for the file_simplify_name utility function.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6f42e76d804fcd4f1b27cebf5ef57dd3a7fb94f7
User & Date: drh 2011-01-13 00:01:27
References
2011-02-15
13:16 New ticket [674d5d55] The timeline does not filter by an unexisting tag. artifact: f4579196 user: anonymous
2011-02-14
14:34 New ticket [c64e6651] Wiki conflicts go unnoticed. artifact: a8e94ba6 user: viriketo
2011-02-11
12:18 New ticket [2ce64a31] Changes equal to the baseline manifest contents are not shown. artifact: 7fc0a990 user: anonymous
2011-02-10
11:36 New ticket [c26c63eb] 'merge --backout' does not handle conflicts properly. artifact: 36e9820e user: anonymous
08:12 New ticket [d9d3fd90] The New Event page expects the time in UTC. artifact: 0a8749c3 user: anonymous
2011-02-09
13:36 New ticket [5f611295] Cannot update to a branch leaf. artifact: e7d5d045 user: anonymous
2011-01-26
22:25 New ticket [b081e09e] On conflict of binary files locally, fossil overwrites local changes. artifact: 5b87d849 user: anonymous
22:19 New ticket [45fccdcd] If 'fossil update' brings in new files already present, it overwrites them silently. artifact: e42a472a user: anonymous
22:16 New ticket [fbea61ca] fossil needs a rebuild after receiving a new baseline checkin. artifact: 54dbc3d1 user: anonymous
22:09 Ticket [115e95ac] ssh clone failing status still Open with 1 other change artifact: ef3aa65b user: anonymous
Context
2011-01-13
00:54
Update the script used to build the "download.html" page so that it can accommodate longer timestamps. check-in: 4b2ab22c user: drh tags: trunk
00:01
Add tests for the file_simplify_name utility function. check-in: 6f42e76d user: drh tags: trunk
2011-01-12
16:04
Fix the file_simplify_name() utility function so that it works with relative pathnames. Ticket [99caf06e17bed849146] check-in: c637a8ac user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added test/file1.test.











































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
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
#
# Copyright (c) 2011 D. Richard Hipp
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the Simplified BSD License (also
# known as the "2-Clause License" or "FreeBSD License".)
#
# This program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose.
#
# Author contact information:
#   drh@hwaci.com
#   http://www.hwaci.com/drh/
#
############################################################################
#
# File utilities
#

proc simplify-name {testname args} {
  set i 1
  foreach {path result} $args {
    fossil test-simplify-name $path
    test simplify-name-$testname.$i {$::RESULT=="\[$path\] -> \[$result\]"}
    incr i
  }
}

simplify-name 100 . . .// . .. .. ..///// ..
simplify-name 101 {} . / / ///////// / ././././ .
simplify-name 102 x x /x /x ///x /x
simplify-name 103 a/b a/b /a/b /a/b a///b a/b ///a///b///// /a/b
simplify-name 104 a/b/../c/ a/c /a/b/../c /a/c /a/b//../c /a/c /a/b/..///c /a/c
simplify-name 105 a/b/../../x/y x/y /a/b/../../x/y /x/y
simplify-name 106 a/b/../../../x/y ../x/y /a/b/../../../x/y /../x/y
simplify-name 107 a/./b/.././../x/y x/y a//.//b//..//.//..//x//y/// x/y