OXIESEC PANEL
- Current Dir:
/
/
opt
/
golang
/
1.22.0
/
src
/
cmd
/
internal
/
objabi
Server IP: 191.96.63.230
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
autotype.go
1.79 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
flag.go
9.51 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
flag_test.go
610 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
funcid.go
1.62 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
head.go
2.92 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
line.go
3.77 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
line_test.go
1.25 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
path.go
1.93 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
path_test.go
2.27 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
pkgspecial.go
3.68 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
reloctype.go
17.31 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
reloctype_string.go
4.46 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
stack.go
904 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
symkind.go
2.8 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
symkind_string.go
1.27 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
typekind.go
647 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
util.go
961 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
zbootstrap.go
64 bytes
02/02/2024 06:09:55 PM
rw-r--r--
Editing: line_test.go
Close
// Copyright 2019 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 objabi import ( "path/filepath" "runtime" "testing" ) // On Windows, "/foo" is reported as a relative path // (it is relative to the current drive letter), // so we need add a drive letter to test absolute path cases. func drive() string { if runtime.GOOS == "windows" { return "c:" } return "" } var absFileTests = []struct { dir string file string rewrites string abs string }{ {"/d", "f", "", "/d/f"}, {"/d", drive() + "/f", "", drive() + "/f"}, {"/d", "f/g", "", "/d/f/g"}, {"/d", drive() + "/f/g", "", drive() + "/f/g"}, {"/d", "f", "/d/f", "??"}, {"/d", "f/g", "/d/f", "g"}, {"/d", "f/g", "/d/f=>h", "h/g"}, {"/d", "f/g", "/d/f=>/h", "/h/g"}, {"/d", "f/g", "/d/f=>/h;/d/e=>/i", "/h/g"}, {"/d", "e/f", "/d/f=>/h;/d/e=>/i", "/i/f"}, } func TestAbsFile(t *testing.T) { for _, tt := range absFileTests { abs := filepath.FromSlash(AbsFile(filepath.FromSlash(tt.dir), filepath.FromSlash(tt.file), tt.rewrites)) want := filepath.FromSlash(tt.abs) if abs != want { t.Errorf("AbsFile(%q, %q, %q) = %q, want %q", tt.dir, tt.file, tt.rewrites, abs, want) } } }