diff options
author | Mike JS. Choi <mkchoi212@icloud.com> | 2018-05-11 15:51:51 -0500 |
---|---|---|
committer | Mike JS. Choi <mkchoi212@icloud.com> | 2018-05-11 19:40:47 -0500 |
commit | b0d661b5d599c401acc046b56328798313d4a0cc (patch) | |
tree | dbc4d2df6958393dcc7fb22fe2f5a8cdacd7d9d0 | |
parent | c1dd493e4edc0c5004c3fbb1daae8cb704343fa2 (diff) |
Move and rename dummy git repo
-rw-r--r-- | .gitmodules | 6 | ||||
m--------- | assets/dummy_repo (renamed from test) | 0 | ||||
-rw-r--r-- | conflict/command_test.go | 20 |
3 files changed, 14 insertions, 12 deletions
diff --git a/.gitmodules b/.gitmodules index 38170bb..54bb6f7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ -[submodule "test"] - path = test - url = ./test +[submodule "dummy_repo"] + path = assets/dummy_repo + url = ./assets/dummy_repo ignore = dirty diff --git a/test b/assets/dummy_repo -Subproject 52015f0288618327dac43e65a2106da09da9f80 +Subproject 52015f0288618327dac43e65a2106da09da9f80 diff --git a/conflict/command_test.go b/conflict/command_test.go index f99616b..1d00c57 100644 --- a/conflict/command_test.go +++ b/conflict/command_test.go @@ -1,16 +1,18 @@ -package conflict +package conflict_test import ( "strings" "testing" + + "github.com/mkchoi212/fac/conflict" ) -var TestGitPath = "../test" -var TestGitSubPath = "../test/assets" -var CorrectNumMarkers = 75 +var TestGitPath = "assets/dummy_repo" +var TestGitSubPath = "../assets/dummy_repo/assets" +var CorrectNumMarkers = 109 func TestMarkerLocations(t *testing.T) { - markers, ok := MarkerLocations(TestGitPath) + markers, ok := conflict.MarkerLocations("../" + TestGitPath) if ok != nil { t.Errorf("git diff --check failed with error: %s", ok.Error()) } @@ -22,7 +24,7 @@ func TestMarkerLocations(t *testing.T) { } func TestMarkerLocationsFromSubPath(t *testing.T) { - markers, ok := MarkerLocations(TestGitSubPath) + markers, ok := conflict.MarkerLocations(TestGitSubPath) if ok != nil { t.Errorf("git diff --check from sub-directory failed with error: %s", ok.Error()) } @@ -34,13 +36,13 @@ func TestMarkerLocationsFromSubPath(t *testing.T) { } func TestTopLevelPath(t *testing.T) { - topPath, ok := TopLevelPath(TestGitSubPath) + topPath, ok := conflict.TopLevelPath(TestGitSubPath) if ok != nil { t.Errorf("git rev-parse --show-toplevel failed") } - if !(strings.Contains(topPath, "fac/test")) { - t.Errorf("git rev-parse --show-toplevel was incorrect: got %s, want, %s", topPath, "../fac/test") + if !(strings.Contains(topPath, TestGitPath)) { + t.Errorf("git rev-parse --show-toplevel was incorrect: got %s, want, %s", topPath, "../"+TestGitPath) } } |