mirror of
https://github.com/restic/restic.git
synced 2025-10-10 09:53:43 +00:00
ui/termstatus: simplify cleaning up on termination
`writeStatus` also cleans no longer used status lines. The old code actually cleaned one line too much. However, as that line was never used it makes no difference.
This commit is contained in:
@@ -39,11 +39,10 @@ func TestSetStatus(t *testing.T) {
|
||||
term.SetStatus([]string{"quux", "needs\nquote"})
|
||||
exp += home + clear + "quux\n" +
|
||||
home + clear + "\"needs\\nquote\"\n" +
|
||||
home + clear + home + up + up // Third line implicit.
|
||||
home + clear + home + up + up // Clear third line
|
||||
|
||||
cancel()
|
||||
exp += home + clear + "\n" + home + clear + "\n" +
|
||||
home + up + up // Status cleared.
|
||||
exp += home + clear + "\n" + home + clear + home + up // Status cleared
|
||||
|
||||
<-term.closed
|
||||
rtest.Equals(t, exp, buf.String())
|
||||
|
Reference in New Issue
Block a user