You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: files_test.go
    path of file: ./repos/terraform-switcher/lib
    
    the code of the file until where you have to start completion: package lib_test

import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"log"
	"os"
	"os/user"
	"path/filepath"
	"regexp"
	"runtime"
	"strings"
	"testing"
	"time"

	"github.com/warrensbox/terraform-switcher/lib"
)

// TestRenameFile : Create a file, check filename exist,
// rename file, check new filename exit
func TestRenameFile(t *testing.T) {
	installFile := lib.ConvertExecutableExt("terraform")
	installVersion := "terraform_"
	installPath := "/.terraform.versions_test/"
	version := "0.0.7"

	usr, errCurr := user.Current()
	if errCurr != nil {
		log.Fatal(errCurr)
	}
	installLocation := filepath.Join(usr.HomeDir, installPath)

	createDirIfNotExist(inst
    
func TestConvertExecutableExt(t *testing.T) {
	usr, errCurr := user.Current()
	if errCurr != nil {
		log.Fatal(errCurr)
	}

	installPath := "/.terraform.versions_test/"
	test_array := []string{
		"terraform",
		"terraform.exe",
		filepath.Join(usr.HomeDir, installPath, "terraform"),
		filepath.Join(usr.HomeDir, installPath, "terraform.exe"),
	}

	for _, fpath := range test_array {
		fpathExt := lib.ConvertExecutableExt((fpath))
		outputMsg := fpath + " converted to " + fpathExt + " on " + runtime.GOOS

		switch runtime.GOOS {
		case "windows":
			if filepath.Ext(fpathExt) != ".exe" {
				t.Error(outputMsg + " (unexpected)")
				continue
			}

			if filepath.Ext(fpath) == ".exe" {
				if fpathExt != fpath {
					t.Error(outputMsg + " (unexpected)")
				} else {
					t.Logf(outputMsg + " (expected)")
				}
				continue
			}

			if fpathExt != fpath+".exe" {
				t.Error(outputMsg + " (unexpected)")
				continue
			}

			t.Logf(outputMsg + " (expected)")
		default:
			if fpath != fpathExt {
				t.Error(outputMsg + " (unexpected)")
				continue
			}

			t.Logf(outputMsg + " (expected)")
		}
	}
}