mirror of
https://github.com/rclone/rclone.git
synced 2025-06-05 03:34:35 +08:00
fs: re-implement CutoffMode, LogLevel, TerminalColorMode with Enum
This almost 100% backwards compatible. The only difference being that in the rc options/get output CutoffMode, LogLevel, TerminalColorMode will be output as strings instead of integers. This is a lot more convenient for the user. They still accept integer inputs though so the fallout from this should be minimal.
This commit is contained in:
@ -17,7 +17,7 @@ func TestTerminalColorModeString(t *testing.T) {
|
||||
{TerminalColorModeAuto, "AUTO"},
|
||||
{TerminalColorModeAlways, "ALWAYS"},
|
||||
{TerminalColorModeNever, "NEVER"},
|
||||
{36, "TerminalColorMode(36)"},
|
||||
{36, "Unknown(36)"},
|
||||
} {
|
||||
tcm := test.in
|
||||
assert.Equal(t, test.want, tcm.String(), test.in)
|
||||
|
Reference in New Issue
Block a user