Eskil

Check-in [a00e3d71ac]
Login

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

Overview
Comment:Test line numbers in PDF
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a00e3d71ac3d5e6d79eb102f2f87cedceb7f19fe
User & Date: peter 2007-11-27 18:03:06.000
Context
2007-11-27
18:03
Added a call to cleanup at the end. check-in: 33e21532d5 user: peter tags: trunk
18:03
Test line numbers in PDF check-in: a00e3d71ac user: peter tags: trunk
18:02
Use ct ls in exec stub. check-in: cba61dcce0 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to tests/print.test.
10
11
12
13
14
15
16

































test print-1.5 {Tab expansion} {FixTextBlock "\tapa"   1.8} {        apa}

test print-1.6 {Tab expansion} {FixTextBlock "apa\tapa"   1.0} {apa     apa}
test print-1.7 {Tab expansion} {FixTextBlock "a\fpa\tapa" 1.1} {apa    apa}
test print-1.8 {Tab expansion} {FixTextBlock "apa\tapa"   1.4} {apa apa}
test print-1.9 {Tab expansion} {FixTextBlock "apa\tapa"   1.5} {apa        apa}









































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
test print-1.5 {Tab expansion} {FixTextBlock "\tapa"   1.8} {        apa}

test print-1.6 {Tab expansion} {FixTextBlock "apa\tapa"   1.0} {apa     apa}
test print-1.7 {Tab expansion} {FixTextBlock "a\fpa\tapa" 1.1} {apa    apa}
test print-1.8 {Tab expansion} {FixTextBlock "apa\tapa"   1.4} {apa apa}
test print-1.9 {Tab expansion} {FixTextBlock "apa\tapa"   1.5} {apa        apa}

test print-2.1 {Pdf, line numbers} -setup {
    # Create big files with differences at five-digit line numbers
    set f1 [tcltest::makeFile {} _test1]
    set f2 [tcltest::makeFile {} _test2]
    set f3 [tcltest::makeFile {} _test3]
    set ch1 [open $f1 w]
    set ch2 [open $f2 w]
    set data [string repeat xx\n 12345]
    puts $ch1 $data
    puts $ch2 $data
    puts $ch1 "Diffline1.1"
    puts $ch2 "Diffline1.2"
    puts $ch1 $data
    puts $ch2 $data
    puts $ch1 "Diffline2.1"
    puts $ch2 "Diffline2.2"
    puts $ch1 $data
    puts $ch2 $data
    close $ch1
    close $ch2
} -body {
    set res [exec ./eskil.kit -context 5 -printpdf $f3 $f1 $f2]
    puts $res
    set ch [open $f3 r]
    set data [read $ch]
    close $ch
    # Check that line numbers take up 7 chars
    string match "*(    3: )*(24689: )*" $data
} -cleanup {
    tcltest::removeFile {} _test1
    tcltest::removeFile {} _test2
    tcltest::removeFile {} _test3
} -result {1}