From 3de2e3534fb3320081efe100b4da83f034d7155c Mon Sep 17 00:00:00 2001 From: Eyal Posener Date: Sat, 13 May 2017 11:05:38 +0300 Subject: remove testing flags from complete command --- common_test.go | 26 ++++++++++++++++++++++++++ tests.go | 26 -------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 common_test.go delete mode 100644 tests.go diff --git a/common_test.go b/common_test.go new file mode 100644 index 0000000..38fe5f1 --- /dev/null +++ b/common_test.go @@ -0,0 +1,26 @@ +package complete + +import ( + "os" + "sync" + "testing" +) + +var once = sync.Once{} + +func initTests() { + once.Do(func() { + // Set debug environment variable so logs will be printed + if testing.Verbose() { + os.Setenv(envDebug, "1") + // refresh the logger with environment variable set + Log = getLogger() + } + + // Change to tests directory for testing completion of files and directories + err := os.Chdir("./tests") + if err != nil { + panic(err) + } + }) +} diff --git a/tests.go b/tests.go deleted file mode 100644 index 38fe5f1..0000000 --- a/tests.go +++ /dev/null @@ -1,26 +0,0 @@ -package complete - -import ( - "os" - "sync" - "testing" -) - -var once = sync.Once{} - -func initTests() { - once.Do(func() { - // Set debug environment variable so logs will be printed - if testing.Verbose() { - os.Setenv(envDebug, "1") - // refresh the logger with environment variable set - Log = getLogger() - } - - // Change to tests directory for testing completion of files and directories - err := os.Chdir("./tests") - if err != nil { - panic(err) - } - }) -} -- cgit v1.2.3