]> ruderich.org/simon Gitweb - safcm/safcm.git/blobdiff - remote/ainsl/ainsl_test.go
Remove superfluous struct names
[safcm/safcm.git] / remote / ainsl / ainsl_test.go
index 3d391f0ce49ceaf5e68eb1052e0ddae1bc3671fa..07d92420b59a076e19c8022a690577a299971a26 100644 (file)
@@ -54,10 +54,10 @@ func TestHandle(t *testing.T) {
        }
        _, uid, _, gid := ft.CurrentUserAndGroup()
 
-       symlinkExists := "open file: too many levels of symbolic links"
+       symlinkExists := "\"file\": too many levels of symbolic links"
        if runtime.GOOS == "freebsd" {
                // EMLINK instead of ELOOP
-               symlinkExists = "open file: too many links"
+               symlinkExists = "\"file\": too many links"
        }
 
        tests := []struct {
@@ -94,7 +94,7 @@ func TestHandle(t *testing.T) {
                        nil,
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0640,
                                        Data: []byte("line\n"),
@@ -141,7 +141,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("line\n"),
@@ -161,7 +161,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("existing\nline\n"),
@@ -182,7 +182,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("existing\nline\n"),
@@ -204,7 +204,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("first\nline\n"),
@@ -225,7 +225,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("first\nline\n"),
@@ -246,7 +246,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: 0641,
                                        Data: []byte("# line with spaces\nline with spaces\n"),
@@ -268,7 +268,7 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: fs.ModeSymlink | 0777,
                                        Data: []byte("target"),
@@ -287,13 +287,13 @@ func TestHandle(t *testing.T) {
                        },
                        []ft.File{
                                root,
-                               ft.File{
+                               {
                                        Path: "file",
                                        Mode: fs.ModeNamedPipe | 0640,
                                },
                        },
                        nil,
-                       fmt.Errorf("\"file\" is not a regular file but p---------"),
+                       fmt.Errorf("\"file\": not a regular file but p---------"),
                },
        }