Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 57 for RegExp (0.25 sec)

  1. tests/table_test.go

    	if !regexp.MustCompile("SELECT \\* FROM `user`").MatchString(r.Statement.SQL.String()) {
    		t.Errorf("Table with escape character, got %v", r.Statement.SQL.String())
    	}
    
    	r = dryDB.Table("user as u").Select("name").Find(&User{}).Statement
    	if !regexp.MustCompile("SELECT .name. FROM user as u WHERE .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  2. istioctl/pkg/dashboard/dashboard_test.go

    			WantException:  false,
    		},
    		{ // case 4
    			Args:           strings.Split("envoy --browser=false", " "),
    			ExpectedRegexp: regexp.MustCompile(".*Error: specify a pod or --selector"),
    			WantException:  true,
    		},
    		{ // case 5
    			Args:           strings.Split("envoy --browser=false pod-123456-7890", " "),
    			ExpectedRegexp: regexp.MustCompile("http://localhost:3456"),
    			WantException:  false,
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Nov 21 01:17:24 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  3. docs/debugging/pprofgoparser/main.go

    package main
    
    import (
    	"bufio"
    	"bytes"
    	"flag"
    	"fmt"
    	"log"
    	"math"
    	"os"
    	"path"
    	"regexp"
    	"strconv"
    	"strings"
    	"time"
    )
    
    var (
    	goroutinesRE, searchRE *regexp.Regexp
    
    	// User input flags
    	searchText           string
    	goTime, less, margin time.Duration
    )
    
    func init() {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  4. tests/query_test.go

    	if !regexp.MustCompile("SELECT .*id.*name.*updated_at.*created_at.* FROM .*users").MatchString(result.Statement.SQL.String()) {
    		t.Fatalf("SQL should include selected names, but got %v", result.Statement.SQL.String())
    	}
    
    	result = DB.Session(&gorm.Session{DryRun: true}).Model(&User{}).Find(&User{}, user.ID)
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
  5. misc/go_android_exec/exitcode_test.go

    		t.Errorf("want output %q, got %q", want, got)
    	}
    	if want := 1; want != code {
    		t.Errorf("want exit code %d, got %d", want, code)
    	}
    }
    
    func TestExitCodeMissing(t *testing.T) {
    	var wantErr *regexp.Regexp
    	check := func(text string) {
    		t.Helper()
    		var out strings.Builder
    		f, exitStr := newExitCodeFilter(&out)
    		if want := "exitcode="; want != exitStr {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed May 03 14:54:58 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  6. istioctl/pkg/util/testutil/util.go

    package testutil
    
    import (
    	"bytes"
    	"regexp"
    	"strings"
    	"testing"
    
    	"github.com/spf13/cobra"
    
    	"istio.io/istio/pilot/test/util"
    )
    
    type TestCase struct {
    	Args []string
    
    	// Typically use one of the three
    	ExpectedOutput string         // Expected constant output
    	ExpectedRegexp *regexp.Regexp // Expected regexp output
    	GoldenFilename string         // Expected output stored in golden file
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. tests/sql_builder_test.go

    	sql := DB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...)
    	if !regexp.MustCompile(`.*age.*=8,`).MatchString(sql) {
    		t.Errorf("Failed to generate sql, got %v", sql)
    	}
    
    	stmt = dryRunDB.Model(&user).Where("id = ?", 1).Updates(map[string]interface{}{"age": ageUint64(10241024)}).Statement
    	sql = DB.Dialector.Explain(stmt.SQL.String(), stmt.Vars...)
    	if !regexp.MustCompile(`.*age.*=10241024,`).MatchString(sql) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 16.7K bytes
    - Viewed (0)
  8. logger/sql.go

    	}
    }
    
    // ExplainSQL generate SQL string with given parameters, the generated SQL is expected to be used in logger, execute it might introduce a SQL injection vulnerability
    func ExplainSQL(sql string, numericPlaceholder *regexp.Regexp, escaper string, avars ...interface{}) string {
    	var (
    		convertParams func(interface{}, int)
    		vars          = make([]string, len(avars))
    	)
    
    	convertParams = func(v interface{}, idx int) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/podcgroupns.go

    // the regexes must include two named groups "poduid" and "containerid"
    // if the regex needs to exclude certain substrings, the "mustnotmatch" group can be used
    // nolint: lll
    var cgroupREs = []*regexp.Regexp{
    	// the regex used to parse out the pod UID and container ID from a
    	// cgroup name. It assumes that any ".scope" suffix has been trimmed off
    	// beforehand.  CAUTION: we used to verify that the pod and container id were
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 11K bytes
    - Viewed (0)
  10. istioctl/pkg/validate/validate_test.go

    		os.RemoveAll(tempDirJSON)
    		os.RemoveAll(validTempDirJSON)
    	})
    
    	cases := []struct {
    		name           string
    		args           []string
    		wantError      bool
    		expectedRegexp *regexp.Regexp // Expected regexp output
    	}{
    		{
    			name:      "valid port naming service",
    			args:      []string{"--filename", validPortNamingSvcFile},
    			wantError: false,
    		},
    		{
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Jul 25 08:08:36 GMT 2023
    - 21.5K bytes
    - Viewed (0)
Back to top