Skip to content

Commit 8e04909

Browse files
committed
Update unit test for internal function unzipToTemp
- Move security markdown into .github directory - Fix incorrect docs of the AddChart function - Update the CodeQL config
1 parent b53bad3 commit 8e04909

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

Diff for: SECURITY.md renamed to .github/SECURITY.md

File renamed without changes.

Diff for: .github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
analyze:
1313
name: Analyze
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515

1616
strategy:
1717
fail-fast: false

Diff for: chart.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ func (opts *Chart) parseTitle() {
935935
// is optional. The default value is auto.
936936
//
937937
// Alignment: Specifies that the alignment of the horizontal and vertical axis.
938-
// The properties of font that can be set are:
938+
// The properties of alignment that can be set are:
939939
//
940940
// TextRotation
941941
// Vertical

Diff for: lib_test.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"fmt"
88
"io"
99
"os"
10-
"runtime"
1110
"strconv"
1211
"strings"
1312
"sync"
@@ -362,9 +361,6 @@ func TestReadBytes(t *testing.T) {
362361
}
363362

364363
func TestUnzipToTemp(t *testing.T) {
365-
if ver := runtime.Version(); strings.HasPrefix(ver, "go1.19") || strings.HasPrefix(ver, "go1.2") {
366-
t.Skip()
367-
}
368364
os.Setenv("TMPDIR", "test")
369365
defer os.Unsetenv("TMPDIR")
370366
assert.NoError(t, os.Chmod(os.TempDir(), 0o444))
@@ -382,7 +378,7 @@ func TestUnzipToTemp(t *testing.T) {
382378
"\x00\x00\x00\x00\x0000000000\x00\x00\x00\x00000" +
383379
"00000000PK\x01\x0200000000" +
384380
"0000000000000000\v\x00\x00\x00" +
385-
"\x00\x0000PK\x05\x06000000\x05\x000000" +
381+
"\x00\x0000PK\x05\x06000000\x05\x00\xfd\x00\x00\x00" +
386382
"\v\x00\x00\x00\x00\x00")
387383
z, err := zip.NewReader(bytes.NewReader(data), int64(len(data)))
388384
assert.NoError(t, err)

0 commit comments

Comments
 (0)