package pkg

import (
	"os"
	"reflect"
	"testing"
)

func TestDefaultRunArgs(t *testing.T) {
	expected := RunArgs{
		Streams: Streams{
			Out: os.Stdout,
			In:  os.Stdin,
			Err: os.Stderr,
		},
		Argv: os.Args,

		Config: Config{
			RepoPath:             REPO_PATH,
			DocDir:               DOC_DIR,
			TmpDir:               TMP_DIR,
			ConfigDir:            CONFIG_DIR,
			Greylist:             GREYLIST,
			Blacklist:            BLACKLIST,
			OtherBlacklist:       OTHER_BLACKLIST,
			DefaultPkgFile:       DEFAULT_PKG_FILE,
			SlackwareVersionFile: SLACKWARE_VERSION_FILE,
			PullCmd:              PULL_CMD,
			SyncCmd:              SYNC_CMD,
			CleanCmd:             CLEAN_CMD,
			DownloadCmd:          DOWNLOAD_CMD,
			InstallCmd:           INSTALL_CMD,
			FallbackPager:        FALLBACK_PAGER,
		},
	}

	if got := DefaultRunArgs(); !reflect.DeepEqual(got, expected) {
		t.Fatalf("DefaultRunArgs() = %#v, want %#v", got, expected)
	}
}
