ooxml

Check-in [268a41f89d]
Login

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

Overview
Comment:formatcell.test column
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tcltest
Files: files | file ages | folders
SHA3-256: 268a41f89d61343a4a4f1de6345697c6853c76099dffc67fec42aa6cab1efe66
User & Date: alex 2019-11-27 16:57:48
Context
2019-11-28
08:16
formatcell.test borders check-in: 4ef4f97de4 user: alex tags: tcltest
2019-11-27
16:57
formatcell.test column check-in: 268a41f89d user: alex tags: tcltest
15:00
merged from trunk check-in: 47e17db8b5 user: alex tags: tcltest
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ooxml.tcl.

2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
    my variable obj
    my variable cols

    array set opts {
      index {}
      to {}
      width {}
      style {}
      bestfit 0
      customwidth 0
      string 0
      nozero 0
      calcfit 0
    }








|







2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
    my variable obj
    my variable cols

    array set opts {
      index {}
      to {}
      width {}
      style 0
      bestfit 0
      customwidth 0
      string 0
      nozero 0
      calcfit 0
    }

Changes to tests/benchmark.test.

34
35
36
37
38
39
40

41
42
43
44
45
46
47
..
54
55
56
57
58
59
60

61
62
63
64
65
66
67
68
69
    incr row
  }
  $spreadsheet write "$rows-$cols.xlsx"
  $spreadsheet destroy
}



test Benchmark-1.1 {benchmark cell generating} {
  set rc 1

  set list {msec per cell}
  set first -1
  foreach {rows cols} { 500 10 1000 10 3000 10 5000 10 } {
    set msec [lindex [time {doit $rows $cols}] 0]
................................................................................
      puts $list
      set rc 0
    }
  }

  return $rc
} 1



file delete -force 500-10.xlsx 1000-10.xlsx 3000-10.xlsx 5000-10.xlsx


# cleanup
::tcltest::cleanupTests
return








>







 







>









34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
..
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
    incr row
  }
  $spreadsheet write "$rows-$cols.xlsx"
  $spreadsheet destroy
}


if 0 {
test Benchmark-1.1 {benchmark cell generating} {
  set rc 1

  set list {msec per cell}
  set first -1
  foreach {rows cols} { 500 10 1000 10 3000 10 5000 10 } {
    set msec [lindex [time {doit $rows $cols}] 0]
................................................................................
      puts $list
      set rc 0
    }
  }

  return $rc
} 1
}


file delete -force 500-10.xlsx 1000-10.xlsx 3000-10.xlsx 5000-10.xlsx


# cleanup
::tcltest::cleanupTests
return

Changes to tests/formatcell.test.

932
933
934
935
936
937
938
939
940



941
942
943
944
945
946
947
  }
  return $rc
} 1


test FormatCellCheckColumns-10.1 {Check Worksheet Columns} {
  set rc 1
  return $rc
  for {set i 0} {$i < $w_obj(1,cols)} {incr i} {



    array set w $w_cols(1,$i)
    array set r $workbook(0,col,$i)
    foreach {n v} [array get w] {
      if {![info exists r($n)] || $r($n) ne $v} {
        set rc 0
      }
    }







|
|
>
>
>







932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
  }
  return $rc
} 1


test FormatCellCheckColumns-10.1 {Check Worksheet Columns} {
  set rc 1
  set idxList {}
  foreach n [array names w_cols 1,*] {
    lappend idxList [lindex [split $n ,] end]
  }
  foreach i $idxList {
    array set w $w_cols(1,$i)
    array set r $workbook(0,col,$i)
    foreach {n v} [array get w] {
      if {![info exists r($n)] || $r($n) ne $v} {
        set rc 0
      }
    }