checking in some WIP
* added some netx funcs * added netx/dnsx * currently updating docs and adding *x funcs to sprigx
This commit is contained in:
@@ -37,6 +37,17 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func TestFuncsAscii(t *testing.T) {
|
||||
|
||||
var err error
|
||||
// var s string = "This is a §\nmulti-line\nstring 😀 with\nunicode text.\n"
|
||||
var s string = "This is a §\nmulti-line\nstring with\nno unicode text.\n"
|
||||
|
||||
if _, err = IsAscii(s, false, true); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRedact(t *testing.T) {
|
||||
|
||||
var out string
|
||||
@@ -171,6 +182,18 @@ func TestRedact(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestReverse(t *testing.T) {
|
||||
|
||||
var rev string
|
||||
var s string = "012345679abcdef"
|
||||
|
||||
rev = Reverse(s)
|
||||
if rev != "fedcba976543210" {
|
||||
t.Errorf("reverse of s '%s'; expected 'fedcba976543210', got '%s'", s, rev)
|
||||
}
|
||||
t.Logf("s: %s\nReverse: %s", s, rev)
|
||||
}
|
||||
|
||||
func TestTrimLines(t *testing.T) {
|
||||
|
||||
var out string
|
||||
|
||||
Reference in New Issue
Block a user