Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for testUnquote (0.14 sec)

  1. src/strconv/quote_test.go

    	"\"\n\"",
    	"\"\\n\n\"",
    	"'\n'",
    	`"\udead"`,
    	`"\ud83d\ude4f"`,
    }
    
    func TestUnquote(t *testing.T) {
    	for _, tt := range unquotetests {
    		testUnquote(t, tt.in, tt.out, nil)
    	}
    	for _, tt := range quotetests {
    		testUnquote(t, tt.out, tt.in, nil)
    	}
    	for _, s := range misquoted {
    		testUnquote(t, s, "", ErrSyntax)
    	}
    }
    
    // Issue 23685: invalid UTF-8 should not go through the fast path.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 31 20:37:15 UTC 2022
    - 9.6K bytes
    - Viewed (0)
  2. pkg/util/shellescape/quote_test.go

    // See the License for the specific language governing permissions and
    // limitations under the License.
    
    package shellescape
    
    import (
    	"os/exec"
    	"strings"
    	"testing"
    )
    
    func TestQuote(t *testing.T) {
    	testCases := []string{
    		`{"key": "value"}`,
    		`it's going to need single quotes`,
    		"",
    		"no issues here",
    	}
    	for _, original := range testCases {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 07 20:37:19 UTC 2020
    - 1.1K bytes
    - Viewed (0)
  3. src/time/format_test.go

    		} else if tm.Year() != 2020 || tm.YearDay() != i {
    			t.Errorf("got year %d yearday %d, want %d %d", tm.Year(), tm.YearDay(), 2020, i)
    		}
    	}
    }
    
    // Issue 45391.
    func TestQuote(t *testing.T) {
    	tests := []struct {
    		s, want string
    	}{
    		{`"`, `"\""`},
    		{`abc"xyz"`, `"abc\"xyz\""`},
    		{"", `""`},
    		{"abc", `"abc"`},
    		{`☺`, `"\xe2\x98\xba"`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:58:29 UTC 2024
    - 36.4K bytes
    - Viewed (0)
Back to top