Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TestQuote (0.25 sec)

  1. 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)
  2. src/strconv/quote_test.go

    	{"!\u00a0!\u2000!\u3000!", `"!\u00a0!\u2000!\u3000!"`, `"!\u00a0!\u2000!\u3000!"`, "\"!\u00a0!\u2000!\u3000!\""},
    	{"\x7f", `"\x7f"`, `"\x7f"`, `"\x7f"`},
    }
    
    func TestQuote(t *testing.T) {
    	for _, tt := range quotetests {
    		if out := Quote(tt.in); out != tt.out {
    			t.Errorf("Quote(%s) = %s, want %s", tt.in, out, tt.out)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 31 20:37:15 UTC 2022
    - 9.6K 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