diff --git a/Makefile b/Makefile index 422d5898..9a74c5b3 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PREFIX := /usr DESTDIR := MAJORVERSION := 8 -MINORVERSION ?= $(shell git rev-list --count master) +MINORVERSION ?= 2 PATCHVERSION := 0 VERSION ?= ${MAJORVERSION}.${MINORVERSION}.${PATCHVERSION} diff --git a/config.go b/config.go index a45bc5b4..af1c9f6a 100644 --- a/config.go +++ b/config.go @@ -78,7 +78,7 @@ type Configuration struct { UseAsk bool `json:"useask"` } -var version = "8.1173" +var version = "8.2.0" // configFileName holds the name of the config file. const configFileName string = "config.json" diff --git a/config_test.go b/config_test.go index 3e271cb0..469cc64a 100644 --- a/config_test.go +++ b/config_test.go @@ -14,7 +14,8 @@ func expect(t *testing.T, field string, a interface{}, b interface{}, err error) } func TestConfig(t *testing.T) { - config.PacmanConf = "testdata/pacman.conf" + config = &Configuration{} + config.PacmanConf = "./testdata/pacman.conf" err := initAlpm() if err != nil { diff --git a/install.go b/install.go index f062115d..453bd617 100644 --- a/install.go +++ b/install.go @@ -434,9 +434,9 @@ nextpkg: if len(incompatible) > 0 { fmt.Println() - fmt.Print(bold(yellow(arrow))+" The following packages are not compatible with your architecture:") + fmt.Print(bold(yellow(arrow)) + " The following packages are not compatible with your architecture:") for pkg := range incompatible { - fmt.Print(" "+cyan(basesMap[pkg].String())) + fmt.Print(" " + cyan(basesMap[pkg].String())) } fmt.Println() diff --git a/print_test.go b/print_test.go deleted file mode 100644 index d05e58d7..00000000 --- a/print_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package main - -import ( - "os" - "testing" -) - -func benchmarkPrintSearch(search string, b *testing.B) { - old := os.Stdout - _, w, _ := os.Pipe() - os.Stdout = w - - for n := 0; n < b.N; n++ { - res, _ := queryRepo(append([]string{}, search)) - res.printSearch() - } - os.Stdout = old -} - -func BenchmarkPrintSearchSimpleTopDown(b *testing.B) { - config.SortMode = TopDown - benchmarkPrintSearch("chromium", b) -} -func BenchmarkPrintSearchComplexTopDown(b *testing.B) { - config.SortMode = TopDown - benchmarkPrintSearch("linux", b) -} - -func BenchmarkPrintSearchSimpleBottomUp(b *testing.B) { - config.SortMode = BottomUp - benchmarkPrintSearch("chromium", b) -} -func BenchmarkPrintSearchComplexBottomUp(b *testing.B) { - config.SortMode = BottomUp - benchmarkPrintSearch("linux", b) -} diff --git a/query_test.go b/query_test.go deleted file mode 100644 index 5e26624b..00000000 --- a/query_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import "testing" - -func benchmarkSearch(search string, b *testing.B) { - for n := 0; n < b.N; n++ { - queryRepo(append([]string{}, search)) - } -} -func BenchmarkSearchSimpleTopDown(b *testing.B) { - config.SortMode = TopDown - benchmarkSearch("chromium", b) -} - -func BenchmarkSearchSimpleBottomUp(b *testing.B) { - config.SortMode = BottomUp - benchmarkSearch("chromium", b) -} - -func BenchmarkSearchComplexTopDown(b *testing.B) { - config.SortMode = TopDown - benchmarkSearch("linux", b) -} -func BenchmarkSearchComplexBottomUp(b *testing.B) { - config.SortMode = BottomUp - benchmarkSearch("linux", b) -}