@@ -648,7 +648,7 @@ func testRepeatedCommandThenQuery(t *testing.T, tester shellTester) {
648648 }
649649
650650 // Run a command many times
651- for i := 0 ; i < 25 ; i ++ {
651+ for i := range 25 {
652652 tester .RunInteractiveShell (t , fmt .Sprintf ("echo mycommand-%d" , i ))
653653 }
654654
@@ -688,7 +688,7 @@ func testRepeatedCommandAndQuery(t *testing.T, tester shellTester) {
688688 }
689689
690690 // Run a command many times
691- for i := 0 ; i < 25 ; i ++ {
691+ for i := range 25 {
692692 tester .RunInteractiveShell (t , fmt .Sprintf ("echo mycommand-%d" , i ))
693693 out = hishtoryQuery (t , tester , fmt .Sprintf ("mycommand-%d" , i ))
694694 if strings .Count (out , "\n " ) != 3 {
@@ -707,7 +707,7 @@ func testRepeatedEnableDisable(t *testing.T, tester shellTester) {
707707 installHishtory (t , tester , "" )
708708
709709 // Run a command many times
710- for i := 0 ; i < 25 ; i ++ {
710+ for i := range 25 {
711711 tester .RunInteractiveShell (t , fmt .Sprintf (`echo mycommand-%d
712712 hishtory disable
713713echo shouldnotshowup
@@ -767,7 +767,7 @@ echo hello2
767767func waitForBackgroundSavesToComplete (t testing.TB ) {
768768 lastOut := ""
769769 lastErr := ""
770- for i := 0 ; i < 20 ; i ++ {
770+ for range 20 {
771771 cmd := exec .Command (getPidofCommand (), "hishtory" )
772772 var stdout bytes.Buffer
773773 var stderr bytes.Buffer
@@ -2942,7 +2942,7 @@ func TestSetConfigNoCorruption(t *testing.T) {
29422942 conf , err := hctx .GetConfig ()
29432943 require .NoError (t , err )
29442944 var doneWg sync.WaitGroup
2945- for i := 0 ; i < 10 ; i ++ {
2945+ for i := range 10 {
29462946 doneWg .Add (1 )
29472947 go func (i int ) {
29482948 // Make a new config of a varied length
0 commit comments