Skip to content

Commit

Permalink
Fix a test we recently broke
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Nov 1, 2024
1 parent 81ae935 commit ed0f939
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion m/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,14 @@ func TestReadTextDone(t *testing.T) {
// JSON should be auto detected and formatted
func TestFormatJson(t *testing.T) {
jsonStream := strings.NewReader(`{"key": "value"}`)
testMe := NewReaderFromStream("JSON test", jsonStream, formatters.TTY, ReaderOptions{Style: styles.Get("native")})
testMe := NewReaderFromStream(
"JSON test",
jsonStream,
formatters.TTY,
ReaderOptions{
Style: styles.Get("native"),
ShouldFormat: true,
})

assert.NilError(t, testMe._wait())

Expand Down
2 changes: 1 addition & 1 deletion moar.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func pagerFromArgs(

noLineNumbers := flagSet.Bool("no-linenumbers", noLineNumbersDefault(), "Hide line numbers on startup, press left arrow key to show")
noStatusBar := flagSet.Bool("no-statusbar", false, "Hide the status bar, toggle with '='")
noFormat := flagSet.Bool("no-format", false, "Never format the input")
noFormat := flagSet.Bool("no-format", false, "Never format the input (but keep highlighting)")
quitIfOneScreen := flagSet.Bool("quit-if-one-screen", false, "Don't page if contents fits on one screen")
noClearOnExit := flagSet.Bool("no-clear-on-exit", false, "Retain screen contents when exiting moar")
statusBarStyle := flagSetFunc(flagSet, "statusbar", m.STATUSBAR_STYLE_INVERSE,
Expand Down

0 comments on commit ed0f939

Please sign in to comment.