mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
```bash for file in `cat diffys`; do printf '%s\n%s\n' "// Copyright 2021 Molecula Corp. All rights reserved." "$(cat $file)" >$file; done ```
23 lines
681 B
Go
23 lines
681 B
Go
// Copyright 2021 Molecula Corp. All rights reserved.
|
|
package cmd_test
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestCheckHelp(t *testing.T) {
|
|
output, err := ExecNewRootCommand(t, "check", "--help")
|
|
if !strings.Contains(output, "Usage:") ||
|
|
!strings.Contains(output, "Flags:") ||
|
|
!strings.Contains(output, "featurebase check") || err != nil {
|
|
t.Fatalf("Command 'check --help' not working, err: '%v', output: '%s'", err, output)
|
|
}
|
|
}
|
|
|
|
func TestCheckNoPath(t *testing.T) {
|
|
output, err := ExecNewRootCommand(t, "check")
|
|
if !strings.Contains(err.Error(), "path required") {
|
|
t.Fatalf("Command 'check' without args should error but: err: '%v', output: '%v'", err, output)
|
|
}
|
|
}
|