]> go.fuhry.dev Git - fsnotify.git/commitdiff
Port minor test changes from fen-v2 branch; make LICENSE text not ugly
authorMartin Tournoij <martin@arp242.net>
Sat, 6 Aug 2022 18:03:28 +0000 (20:03 +0200)
committerMartin Tournoij <martin@arp242.net>
Sat, 6 Aug 2022 18:03:28 +0000 (20:03 +0200)
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.

12 files changed:
LICENSE
fen.go
fsnotify.go
fsnotify_unsupported.go
helpers_test.go
inotify.go
inotify_test.go
integration_darwin_test.go
kqueue.go
open_mode_bsd.go
open_mode_darwin.go
windows.go

diff --git a/LICENSE b/LICENSE
index e180c8fb0599ce1482f425d6fdc63e5b9ccf1faf..fb03ade750679c3698579f0243a066f1d107eae0 100644 (file)
--- 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 b3ac3d8f55faf53adf88849af1cb884946a51917..58737a47a02b4a453bb6391fe1639c78c2f85775 100644 (file)
--- 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
 
index 4ff4e3db73638087a1e18724e3f635eebaba9a02..6c49b4307b0a87e4420e228b11cef118e0170d56 100644 (file)
@@ -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
 
index 59688559836f37550445eb1ea8afb5aa53e62574..d7b4c17c01e7b65fdd1c181196299044bf3f437f 100644 (file)
@@ -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
 
index a3ce4587747771dd0ffc0e85dd056ba6d9c24179..0f075c1185a7ce7ff96fa68781656c841e84850d 100644 (file)
@@ -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[""]
 }
index 258469f0dcaccc904859c4862df6b57bf379b9c1..16fcd5c60ee1f6af538425420518807e14a7b680 100644 (file)
@@ -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
 
index 785888bc29c609a7dc98c10bcda1c61805fecbb0..29fdcaba6f613dd1826b3b9e6c3e3b401a09070c 100644 (file)
@@ -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
 
index 06fd665c0ece34ab9107ba4b61e605b714d0de0c..a5dfb08c32bfbddc97ad890d2a45a98e5b90004f 100644 (file)
@@ -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 (
index 91ce0997a14a988e9f3cc92c5f4765782d1680c6..80853f7e1331ecf0c3be42a60b29bc2152877a47 100644 (file)
--- 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
 
index 36cc3845b6e7b0d5fe5ee638bb10ecf3d84d87fb..4322b0b8855710d3ad624498b42c3494f705e188 100644 (file)
@@ -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
 
index 98cd8476ffb886ccd8a290bacca66c6cf272942a..5da5ffa78fe71a8b9fb33c75c53b1bb5a523bd22 100644 (file)
@@ -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
 
index 9b43d386a413259338f6ed4ca57ac17f47be12b9..33a04cdbdee57e969be957ae30f09550099f5522 100644 (file)
@@ -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