@@ -695,14 +695,14 @@ func TestTomlColorisationNumberBug(t *testing.T) {
695695 encoder := NewTomlEncoder ()
696696 tomlEncoder := encoder .(* tomlEncoder )
697697
698- // Test case that exposes the bug: "123-+-45" should NOT be colorized as a single number
698+ // Test case that exposes the bug: "123-+-45" should NOT be colourised as a single number
699699 input := "A = 123-+-45\n "
700700 result := string (tomlEncoder .colorizeToml ([]byte (input )))
701701
702- // The bug causes "123-+-45" to be colorized as one token
702+ // The bug causes "123-+-45" to be colourised as one token
703703 // It should stop at "123" because the next character '-' is not valid in this position
704704 if strings .Contains (result , "123-+-45" ) {
705- // Check if it's colorized as a single token (no color codes in the middle)
705+ // Check if it's colourised as a single token (no color codes in the middle)
706706 idx := strings .Index (result , "123-+-45" )
707707 // Look backwards for color code
708708 beforeIdx := idx - 1
@@ -722,8 +722,8 @@ func TestTomlColorisationNumberBug(t *testing.T) {
722722
723723 if beforeIdx >= 0 && hasResetAfter {
724724 // The entire "123-+-45" is wrapped in color codes - this is the bug!
725- t .Errorf ("BUG DETECTED: '123-+-45' is incorrectly colorized as a single number" )
726- t .Errorf ("Expected only '123' to be colorized as a number, but got the entire '123-+-45'" )
725+ t .Errorf ("BUG DETECTED: '123-+-45' is incorrectly colourised as a single number" )
726+ t .Errorf ("Expected only '123' to be colourised as a number, but got the entire '123-+-45'" )
727727 t .Logf ("Full output: %q" , result )
728728 t .Fail ()
729729 }
@@ -740,13 +740,13 @@ func TestTomlColorisationNumberBug(t *testing.T) {
740740 name : "consecutive minuses" ,
741741 input : "A = 123--45\n " ,
742742 invalidSequence : "123--45" ,
743- description : "'123--45' should not be colorized as a single number" ,
743+ description : "'123--45' should not be colourised as a single number" ,
744744 },
745745 {
746746 name : "plus in middle" ,
747747 input : "A = 123+45\n " ,
748748 invalidSequence : "123+45" ,
749- description : "'123+45' should not be colorized as a single number" ,
749+ description : "'123+45' should not be colourised as a single number" ,
750750 },
751751 }
752752
@@ -791,7 +791,7 @@ func TestTomlColorisationNumberBug(t *testing.T) {
791791 t .Run (tt .name , func (t * testing.T ) {
792792 result := tomlEncoder .colorizeToml ([]byte (tt .input ))
793793 if len (result ) == 0 {
794- t .Error ("Expected non-empty colorized output" )
794+ t .Error ("Expected non-empty colourised output" )
795795 }
796796 })
797797 }
@@ -816,7 +816,7 @@ func TestTomlStringEscapeColourization(t *testing.T) {
816816 {
817817 name : "escaped quote at end" ,
818818 input : `A = "test\""` + "\n " ,
819- description : "String ending with escaped quote should be colorized correctly" ,
819+ description : "String ending with escaped quote should be colourised correctly" ,
820820 },
821821 {
822822 name : "escaped backslash then quote" ,
@@ -826,7 +826,7 @@ func TestTomlStringEscapeColourization(t *testing.T) {
826826 {
827827 name : "escaped quote in middle" ,
828828 input : `A = "test\"middle"` + "\n " ,
829- description : "String with escaped quote in the middle should be colorized correctly" ,
829+ description : "String with escaped quote in the middle should be colourised correctly" ,
830830 },
831831 {
832832 name : "multiple escaped quotes" ,
@@ -836,7 +836,7 @@ func TestTomlStringEscapeColourization(t *testing.T) {
836836 {
837837 name : "escaped newline" ,
838838 input : `A = "test\n"` + "\n " ,
839- description : "String with escaped newline should be colorized correctly" ,
839+ description : "String with escaped newline should be colourised correctly" ,
840840 },
841841 {
842842 name : "single quote with escaped single quote" ,
@@ -850,7 +850,7 @@ func TestTomlStringEscapeColourization(t *testing.T) {
850850 // The test should not panic and should return some output
851851 result := tomlEncoder .colorizeToml ([]byte (tt .input ))
852852 if len (result ) == 0 {
853- t .Error ("Expected non-empty colorized output" )
853+ t .Error ("Expected non-empty colourised output" )
854854 }
855855
856856 // Check that the result contains the input string (with color codes)
0 commit comments