From 725c1a0c40971282ff924f4802a57e4c17431691 Mon Sep 17 00:00:00 2001 From: Veniamin Albaev Date: Thu, 27 Dec 2018 17:28:28 +0300 Subject: New feature: File.DuplicateRowTo() duplicate row to specified row position. DuplicateRowTo() is similar to DuplicateRow() but copies specified row not just after specified source row but to any other specified position below or above source row. Also I made minor modifications of tests: using filepath.Join() instead of direct unix-way paths strings to avoid possible tests fails on other OS. --- datavalidation_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'datavalidation_test.go') diff --git a/datavalidation_test.go b/datavalidation_test.go index 82bc42f..fad50c2 100644 --- a/datavalidation_test.go +++ b/datavalidation_test.go @@ -10,13 +10,14 @@ package excelize import ( + "path/filepath" "testing" "github.com/stretchr/testify/assert" ) func TestDataValidation(t *testing.T) { - const resultFile = "./test/TestDataValidation.xlsx" + resultFile := filepath.Join("test", "TestDataValidation.xlsx") xlsx := NewFile() @@ -50,7 +51,7 @@ func TestDataValidation(t *testing.T) { } func TestDataValidationError(t *testing.T) { - const resultFile = "./test/TestDataValidationError.xlsx" + resultFile := filepath.Join("test", "TestDataValidationError.xlsx") xlsx := NewFile() xlsx.SetCellStr("Sheet1", "E1", "E1") -- cgit v1.2.1