Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Added test for merge |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
fcbb229077db1956b53d1a28821fa774 |
User & Date: | peter.spjuth@gmail.com 2011-04-28 00:55:01.000 |
Context
2011-04-29
| ||
23:53 | Improved three-way merge check-in: 2f126fd631 user: peter.spjuth@gmail.com tags: trunk | |
2011-04-28
| ||
00:55 | Added test for merge check-in: fcbb229077 user: peter.spjuth@gmail.com tags: trunk | |
00:21 | Code cleanup to get clean Nagelfar run check-in: 4d66d4009f user: peter.spjuth@gmail.com tags: trunk | |
Changes
Added tests/ancestor.txt.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 73 74 | 0 1 Added left 2 3 4 Added right 5 6 7 Changed same 8 9 10 Changed different 12 13 14 Deleted left 16 17 18 Deleted right 19 20 21 Left: Add+change Right: change 22 23 24 Left: change Right add+change 25 26 27 Left: Delete Right: change 28 29 30 Left: change Right: delete 31 32 33 Added same 34 35 36 Deleted same 37 38 39 Changed adjacent 40 41 42 Left: Add+change Right: change same 43 44 45 Left: change same Right: add+change 46 47 48 Left: change Right: deleted block 49 50 51 52 53 54 55 56 57 58 59 |
Added tests/gui.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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | #------------------------------------------------------------*- tcl -*- # Tests for GUI #---------------------------------------------------------------------- # $Revision$ #---------------------------------------------------------------------- lappend ::auto_path /home/peter/src/TkTest package require TkTest wm withdraw . proc XauthSecure {} { global tcl_platform if {[string compare unix $tcl_platform(platform)]} { # This makes no sense outside of Unix return } set hosts [exec xhost] # the first line is info only foreach host [lrange [split $hosts \n] 1 end] { exec xhost -$host } exec xhost - } XauthSecure proc RestartClient {args} { set ::clientfile ./eskil.kit #if {[file exists ${::clientfile}_i]} { # set ::clientfile ${::clientfile}_i #} if {![catch {send -async Eskil exit}]} { update after 500 } set slavepid [exec $::clientfile -server {*}$args &] after 1000 while {[catch {tktest::init Eskil}]} { after 500 } tktest::cmd wm geometry . +10+10 #set files [tktest::widget -class Listbox -pos 1 -eval "get 0 end"] #if {($mode == 0 && $files ne "_testfile_") || \ # ($mode != 0 && $files ne "")} { # exec kill $slavepid # puts "Another nagelfar is running. Can't do GUI tests." # exit #} } proc DeleteFileToTest {file} { set w [tktest::widget -class Listbox -pos 1] set cont [tktest::cmd $w get 0 end] set i [lsearch $cont $file] if {$i < 0} return tktest::cmd $w see $i set coord [tktest::coord $w bbox $i] tktest::mouse left $coord tktest::key Delete } proc AddFileToTest {file {dialog 0}} { # Dialog = 1 : use gui # Dialog = 2 ; use gui+cancel if {$dialog != 0} { tktest::waitFocus press Add 1 if {$dialog != 1} { tktest::press Cancel } else { set e [tktest::widget -class Entry] tktest::cmd $e insert end $file tktest::press Open } } if {$dialog != 1} { tktest::cmd fileDropFile $file } } proc ResetFilters {} { # FIXA: there should be a GUI way of doing this. tktest::cmd set ::Nagelfar(filter) {} } # Get all lines from the text widget, as a list proc GetTextLines {} { set str [tktest::widget -class Text -eval "get 1.0 end"] return [split [string trim $str] \n] } test gui-1.1 {Run 3-way merge} -setup { set f1 [tcltest::makeFile {} _test1] } -body { RestartClient -fine -a tests/ancestor.txt tests/left.txt tests/right.txt -o $f1 tktest::waitFocus press Save tktest::waitFocus press No tktest::press Close catch {exec diff $f1 tests/merge.txt} } -cleanup { tcltest::removeFile {} _test1 } -result {0} catch {tktest::menu File Quit} catch {send -async Eskil exit} update |
Added tests/left.txt.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 73 74 75 | 0 1 Added left x 2 3 4 Added right 5 6 7 Changed same 8a 9 10 Changed different 12a 13 14 Deleted left 17 18 Deleted right 19 20 21 Left: Add+change Right: change xx 22a 23 24 Left: change Right add+change 25a 26 27 Left: Delete Right: change 29 30 Left: change Right: delete 31a 32 33 Added same xxx 34 35 36 Deleted same 38 39 Changed adjacent 40a 41 42 Left: Add+change Right: change same xxxx 43a 44 45 Left: change same Right: add+change 46a 47 48 Left: change Right: deleted block 49 50a 51 52 53 54 55 56 57 58 59 |
Added tests/merge.txt.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 73 74 75 76 77 78 | 0 1 Added left x 2 3 4 Added right y 5 6 7 Changed same 8a 9 10 Changed different 12b 13 14 Deleted left 17 18 Deleted right 20 21 Left: Add+change Right: change xx 22b 23 24 Left: change Right add+change yy 25b 26 27 Left: Delete Right: change 28a 29 30 Left: change Right: delete 31a 32 33 Added same xxx 34 35 36 Deleted same 38 39 Changed adjacent 40a 41a 42 Left: Add+change Right: change same xxxx 43a 44 45 Left: change same Right: add+change yyyy 46a 47 48 Left: change Right: deleted block 49 50a 51 52 53 54 55 56 57 58 59 |
Added tests/right.txt.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | 0 1 Added left 2 3 4 Added right y 5 6 7 Changed same 8a 9 10 Changed different 12b 13 14 Deleted left 16 17 18 Deleted right 20 21 Left: Add+change Right: change 22b 23 24 Left: change Right add+change yy 25b 26 27 Left: Delete Right: change 28a 29 30 Left: change Right: delete 32 33 Added same xxx 34 35 36 Deleted same 38 39 Changed adjacent 40 41a 42 Left: Add+change Right: change same 43a 44 45 Left: change same Right: add+change yyyy 46a 47 48 Left: change Right: deleted block 52 53 54 55 56 57 58 59 |