
* Fix: don't need sudo if we're root + other aesthetics
* Heavy refactoring, see PR #28
* Fix: avoid silent fatalities
demo: https://tcp.ac/i/JMSUc.gif
* Fix: Inverse check on `IsRoot`
* D.R.Y: check for permissions error in `common.ErrorCheck`
Reduce cognitive complexity.
* Fix: Issue with copying
* Resolve https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646535918
* Resolve https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646606680 and https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646594105
* Revert "Resolve https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646606680 and https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646594105"
This reverts commit ce15213009
.
* Resolve https://github.com/HikariKnight/quickpassthrough/pull/28#discussion_r1646730751
23 lines
432 B
Go
23 lines
432 B
Go
package pages
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestFinalizeNotice(t *testing.T) {
|
|
msg := "\n%s\nprinting the finalize notice for manual review, this test should always pass.\n%s\n\n"
|
|
divider := strings.Repeat("-", len(msg)-12)
|
|
t.Logf(msg, divider, divider)
|
|
t.Log("\n\nWith isRoot == true:\n\n")
|
|
|
|
finalizeNotice(true)
|
|
|
|
println("\n\n")
|
|
|
|
t.Log("\n\nWith isRoot == false:\n\n")
|
|
|
|
finalizeNotice(false)
|
|
|
|
println("\n\n")
|
|
}
|