From: Martin Tournoij Date: Sat, 6 Aug 2022 18:03:28 +0000 (+0200) Subject: Port minor test changes from fen-v2 branch; make LICENSE text not ugly X-Git-Tag: v1.7.2~66 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=844d71f6664f6dbc94a98f2af1626fd294c74654;p=fsnotify.git Port minor test changes from fen-v2 branch; make LICENSE text not ugly Also remove the copyright headers on the files; the license text doesn't require them, forbids removing them, and they add nothing IMHO, and it's a few more lines to scroll past every time you open a file. --- diff --git a/LICENSE b/LICENSE index e180c8f..fb03ade 100644 --- a/LICENSE +++ b/LICENSE @@ -1,28 +1,25 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. -Copyright (c) 2012-2019 fsnotify Authors. All rights reserved. +Copyright © 2012 The Go Authors. All rights reserved. +Copyright © fsnotify Authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. +* Neither the name of Google Inc. nor the names of its contributors may be used + to endorse or promote products derived from this software without specific + prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/fen.go b/fen.go index b3ac3d8..58737a4 100644 --- a/fen.go +++ b/fen.go @@ -1,7 +1,3 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - //go:build solaris // +build solaris diff --git a/fsnotify.go b/fsnotify.go index 4ff4e3d..6c49b43 100644 --- a/fsnotify.go +++ b/fsnotify.go @@ -1,7 +1,3 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - //go:build !plan9 // +build !plan9 diff --git a/fsnotify_unsupported.go b/fsnotify_unsupported.go index 5968855..d7b4c17 100644 --- a/fsnotify_unsupported.go +++ b/fsnotify_unsupported.go @@ -1,7 +1,3 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - //go:build !darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows // +build !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows diff --git a/helpers_test.go b/helpers_test.go index a3ce458..0f075c1 100644 --- a/helpers_test.go +++ b/helpers_test.go @@ -20,7 +20,9 @@ type testCase struct { } func (tt testCase) run(t *testing.T) { + t.Helper() t.Run(tt.name, func(t *testing.T) { + t.Helper() t.Parallel() tmp := t.TempDir() @@ -414,10 +416,20 @@ func newEvents(t *testing.T, s string) Events { return e } switch runtime.GOOS { + // kqueue shortcut case "freebsd", "netbsd", "openbsd", "dragonfly", "darwin": if e, ok := events["kqueue"]; ok { return e } + // Fall back to solaris for illumos, and vice versa. + case "solaris": + if e, ok := events["illumos"]; ok { + return e + } + case "illumos": + if e, ok := events["solaris"]; ok { + return e + } } return events[""] } diff --git a/inotify.go b/inotify.go index 258469f..16fcd5c 100644 --- a/inotify.go +++ b/inotify.go @@ -1,7 +1,3 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - //go:build linux // +build linux diff --git a/inotify_test.go b/inotify_test.go index 785888b..29fdcab 100644 --- a/inotify_test.go +++ b/inotify_test.go @@ -1,7 +1,3 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - //go:build linux // +build linux diff --git a/integration_darwin_test.go b/integration_darwin_test.go index 06fd665..a5dfb08 100644 --- a/integration_darwin_test.go +++ b/integration_darwin_test.go @@ -1,7 +1,3 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - package fsnotify import ( diff --git a/kqueue.go b/kqueue.go index 91ce099..80853f7 100644 --- a/kqueue.go +++ b/kqueue.go @@ -1,7 +1,3 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - //go:build freebsd || openbsd || netbsd || dragonfly || darwin // +build freebsd openbsd netbsd dragonfly darwin diff --git a/open_mode_bsd.go b/open_mode_bsd.go index 36cc384..4322b0b 100644 --- a/open_mode_bsd.go +++ b/open_mode_bsd.go @@ -1,7 +1,3 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - //go:build freebsd || openbsd || netbsd || dragonfly // +build freebsd openbsd netbsd dragonfly diff --git a/open_mode_darwin.go b/open_mode_darwin.go index 98cd847..5da5ffa 100644 --- a/open_mode_darwin.go +++ b/open_mode_darwin.go @@ -1,7 +1,3 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - //go:build darwin // +build darwin diff --git a/windows.go b/windows.go index 9b43d38..33a04cd 100644 --- a/windows.go +++ b/windows.go @@ -1,7 +1,3 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - //go:build windows // +build windows