Grrr, workaround the fact that one can not commit "000" files.
--- a/config_test.go Mon Apr 10 19:57:45 2017 +0200
+++ b/config_test.go Mon Apr 10 20:01:45 2017 +0200
@@ -4,6 +4,7 @@
"testing"
"github.com/stretchr/testify/assert"
"path/filepath"
+ "os"
)
func TestLoadGlobal(t *testing.T) {
@@ -12,8 +13,11 @@
_, err := loadGlobal(filepath.Join("test", "non.toml"))
assert.Error(t, err, "does not exist")
+ // git does now allow you to checkin 000 files :(
+ err = os.Chmod(filepath.Join("test", "perms.toml"), 000)
_, err = loadGlobal(filepath.Join("test", "perms.toml"))
assert.Error(t, err, "unreadable")
+ err = os.Chmod(filepath.Join("test", "perms.toml"), 600)
c, err := loadGlobal(filepath.Join("test", "config.toml"))
assert.NoError(t, err, "should read it fine")