Eskil

Check-in [12ef4c24a2]
Login

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

Overview
Comment:New tests.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 12ef4c24a2cd203c7b61fd0d131abaa4f4835848
User & Date: peter 2004-10-19 18:35:46.000
Context
2004-10-19
18:36
Fixed a bug in clearcase revision handling. Added -nodigit option. check-in: b170f7491b user: peter tags: trunk
18:35
New tests. check-in: 12ef4c24a2 user: peter tags: trunk
18:34
Small fix. check-in: 8793329cdd user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Added tests/rev.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Tests for revision control functions                      -*- tcl -*-
#----------------------------------------------------------------------
# $Revision$
#----------------------------------------------------------------------

# Overload exec during these tests
rename exec _exec
proc exec {args} {
    set cmd [lindex $args 0]
    switch -- $cmd {
        cleartool {
            # cleartool lshistory -short $filename
            # cleartool pwv -s
            # cleartool get -to $outfile $filerev
            # cleartool ls $::diff($top,RevFile)
            if {[lindex $args 1] eq "lshistory"} {
                return [join [list x@/Apa/Bepa/12 x@/Apa/Cepa/2 x@/Apa/22] \n]
            }
            return
        }
        cvs {
            # cvs -z3 update -p ?-r rev? $filename > $outfile
            return
        }
        co {
            # co -p$rev $filename > $outfile
            return
        }
        default {
            eval _exec $args
        }
    }
}

test rev-1.1 {
    ClearCase revisions
} -body {
    ParseCtRevs filename /Bepa 2
} -result {/Bepa/2}

test rev-1.2 {
    ClearCase revisions
} -body {
    ParseCtRevs filename /Bepa 22
} -result {/Bepa/22}

test rev-1.3 {
    ClearCase revisions
} -body {
    ParseCtRevs filename /Bepa Bepa/12
} -result {/Apa/Bepa/12}

test rev-1.4 {
    ClearCase revisions
} -body {
    ParseCtRevs filename /Bepa Cepa/2
} -result {/Apa/Cepa/2}

test rev-1.5 {
    ClearCase revisions
} -body {
    ParseCtRevs filename /Apa/Bepa/Cepa ../5
} -result {/Apa/Bepa/5}

test rev-1.6 {
    ClearCase revisions
} -body {
    ParseCtRevs filename /Apa/Bepa ""
} -result {/Apa/Bepa/12}

rename exec {}
rename _exec exec