fix linter

This commit is contained in:
2025-08-08 12:30:32 +02:00
parent fd17211a53
commit 6094f480f1
18 changed files with 20 additions and 21 deletions

View File

@@ -1,16 +1,15 @@
package main package main
import ( import (
"os"
"testing" "testing"
"github.com/rogpeppe/go-internal/testscript" "github.com/rogpeppe/go-internal/testscript"
) )
func TestMain(m *testing.M) { func TestMain(m *testing.M) {
os.Exit(testscript.RunMain(m, map[string]func() int{ testscript.Main(m, map[string]func(){
"testrpn": Main, "rpn": main,
})) })
} }
func TestRpn(t *testing.T) { func TestRpn(t *testing.T) {

View File

@@ -1,2 +1,2 @@
exec testrpn 1 2 dump exec rpn 1 2 dump
stdout 'Stack revision 2 .0x' stdout 'Stack revision 2 .0x'

View File

@@ -1,2 +1,2 @@
! exec testrpn 1 2 dumb ! exec rpn 1 2 dumb
stdout 'unknown command or operator' stdout 'unknown command or operator'

View File

@@ -1,2 +1,2 @@
exec testrpn -p 4 2 3 / exec rpn -p 4 2 3 /
stdout '0.6667\n' stdout '0.6667\n'

View File

@@ -1,2 +1,2 @@
! exec testrpn 4 + ! exec rpn 4 +
stdout 'stack doesn''t provide enough arguments' stdout 'stack doesn''t provide enough arguments'

View File

@@ -1,2 +1,2 @@
exec testrpn -d 44 55 * exec rpn -d 44 55 *
stdout 'push to stack: 2420.00\n' stdout 'push to stack: 2420.00\n'

View File

@@ -1,2 +1,2 @@
! exec testrpn 100 50 50 - / ! exec rpn 100 50 50 - /
stdout 'division by null' stdout 'division by null'

View File

@@ -1,4 +1,4 @@
exec testrpn -d -c test.lua 3 5 lower exec rpn -d -c test.lua 3 5 lower
stdout '3\n' stdout '3\n'
-- test.lua -- -- test.lua --

View File

@@ -1,2 +1,2 @@
exec testrpn 09:55 4:15 - exec rpn 09:55 4:15 -
stdout '5.67\n' stdout '5.67\n'

View File

@@ -1,2 +1,2 @@
exec testrpn 44 55 * exec rpn 44 55 *
stdout '2420\n' stdout '2420\n'

View File

@@ -1,2 +1,2 @@
exec testrpn -m exec rpn -m
stdout 'This software is licensed under the GNU GENERAL PUBLIC LICENSE' stdout 'This software is licensed under the GNU GENERAL PUBLIC LICENSE'

View File

@@ -1,2 +1,2 @@
exec testrpn -h exec rpn -h
stdout 'This is rpn' stdout 'This is rpn'

View File

@@ -1,2 +1,2 @@
exec testrpn -v exec rpn -v
stdout 'This is rpn version' stdout 'This is rpn version'

View File

@@ -1,4 +1,4 @@
exec echo 1 2 3 4 5 batch median exec echo 1 2 3 4 5 batch median
stdin stdout stdin stdout
exec testrpn exec rpn
[unix] stdout '3\n' [unix] stdout '3\n'

View File

@@ -1,4 +1,4 @@
exec echo 1 2 3 4 5 exec echo 1 2 3 4 5
stdin stdout stdin stdout
[unix] exec testrpn median [unix] exec rpn median
[unix] stdout '3\n' [unix] stdout '3\n'

View File

@@ -1,4 +1,4 @@
exec echo 10 10 + exec echo 10 10 +
stdin stdout stdin stdout
exec testrpn exec rpn
[unix] stdout '20\n' [unix] stdout '20\n'

View File

@@ -1,5 +1,5 @@
stdin input.txt stdin input.txt
exec testrpn exec rpn
[unix] stdout '28\n' [unix] stdout '28\n'
-- input.txt -- -- input.txt --

View File

@@ -1,4 +1,4 @@
exec echo 1 2 3 4 5 median exec echo 1 2 3 4 5 median
stdin stdout stdin stdout
exec testrpn -b exec rpn -b
[unix] stdout '3\n' [unix] stdout '3\n'