diff options
author | xuri <xuri.me@gmail.com> | 2021-02-16 00:02:14 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-02-16 00:02:14 +0800 |
commit | bddea1262b9219df224d19b24928d8da78a2f8c0 (patch) | |
tree | 0aa179d35adaa4ef6ae5deea59e37900d7d8cd68 /sheetpr_test.go | |
parent | 36b7990d6ba1036823abf7a01ec8cf74509d4910 (diff) |
This closes #785, support to change tab color; new formula function: FISHER, FISHERINV, GAMMA, GAMMALN, MIN, MINA, PERMUT
Diffstat (limited to 'sheetpr_test.go')
-rw-r--r-- | sheetpr_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sheetpr_test.go b/sheetpr_test.go index 29bd99e..42e2e0d 100644 --- a/sheetpr_test.go +++ b/sheetpr_test.go @@ -13,6 +13,7 @@ var _ = []SheetPrOption{ EnableFormatConditionsCalculation(false), Published(false), FitToPage(true), + TabColor("#FFFF00"), AutoPageBreaks(true), OutlineSummaryBelow(true), } @@ -22,6 +23,7 @@ var _ = []SheetPrOptionPtr{ (*EnableFormatConditionsCalculation)(nil), (*Published)(nil), (*FitToPage)(nil), + (*TabColor)(nil), (*AutoPageBreaks)(nil), (*OutlineSummaryBelow)(nil), } @@ -35,6 +37,7 @@ func ExampleFile_SetSheetPrOptions() { EnableFormatConditionsCalculation(false), Published(false), FitToPage(true), + TabColor("#FFFF00"), AutoPageBreaks(true), OutlineSummaryBelow(false), ); err != nil { @@ -52,6 +55,7 @@ func ExampleFile_GetSheetPrOptions() { enableFormatConditionsCalculation EnableFormatConditionsCalculation published Published fitToPage FitToPage + tabColor TabColor autoPageBreaks AutoPageBreaks outlineSummaryBelow OutlineSummaryBelow ) @@ -61,6 +65,7 @@ func ExampleFile_GetSheetPrOptions() { &enableFormatConditionsCalculation, &published, &fitToPage, + &tabColor, &autoPageBreaks, &outlineSummaryBelow, ); err != nil { @@ -71,6 +76,7 @@ func ExampleFile_GetSheetPrOptions() { fmt.Println("- enableFormatConditionsCalculation:", enableFormatConditionsCalculation) fmt.Println("- published:", published) fmt.Println("- fitToPage:", fitToPage) + fmt.Printf("- tabColor: %q\n", tabColor) fmt.Println("- autoPageBreaks:", autoPageBreaks) fmt.Println("- outlineSummaryBelow:", outlineSummaryBelow) // Output: @@ -79,6 +85,7 @@ func ExampleFile_GetSheetPrOptions() { // - enableFormatConditionsCalculation: true // - published: true // - fitToPage: false + // - tabColor: "" // - autoPageBreaks: false // - outlineSummaryBelow: true } @@ -94,6 +101,7 @@ func TestSheetPrOptions(t *testing.T) { {new(EnableFormatConditionsCalculation), EnableFormatConditionsCalculation(false)}, {new(Published), Published(false)}, {new(FitToPage), FitToPage(true)}, + {new(TabColor), TabColor("FFFF00")}, {new(AutoPageBreaks), AutoPageBreaks(true)}, {new(OutlineSummaryBelow), OutlineSummaryBelow(false)}, } @@ -147,6 +155,7 @@ func TestSheetPrOptions(t *testing.T) { func TestSetSheetrOptions(t *testing.T) { f := NewFile() + assert.NoError(t, f.SetSheetPrOptions("Sheet1", TabColor(""))) // Test SetSheetrOptions on not exists worksheet. assert.EqualError(t, f.SetSheetPrOptions("SheetN"), "sheet SheetN is not exist") } |