How to use newScanner method of ast Package

Best Syzkaller code snippet using ast.newScanner

test_helpers.go

Source:test_helpers.go Github

copy

Full Screen

1package syntax2import (3 "context"4 "errors"5 "path/filepath"6 "testing"7 "github.com/arr-ai/wbnf/ast"8 "github.com/arr-ai/wbnf/parser"9 "github.com/arr-ai/wbnf/wbnf"10 "github.com/stretchr/testify/assert"11 "github.com/stretchr/testify/require"12 "github.com/arr-ai/arrai/pkg/arraictx"13 "github.com/arr-ai/arrai/pkg/importcache"14 "github.com/arr-ai/arrai/rel"15)16// AssertCodesEvalToSameValue asserts that code evaluate to the same value as17// expected.18func AssertCodesEvalToSameValue(t *testing.T, expected, code string) bool {19 t.Helper()20 ctx := arraictx.InitRunCtx(context.Background())21 ctx = importcache.WithNewImportCache(ctx)22 return AssertCodesEvalToSameValueCtx(ctx, t, expected, code)23}24// AssertCodesEvalToSameValueCtx asserts that code evaluate to the same value as25// expected under the given context.26func AssertCodesEvalToSameValueCtx(ctx context.Context, t *testing.T, expected, code string) bool {27 t.Helper()28 pc := ParseContext{SourceDir: ".."}29 ast, err := pc.Parse(ctx, parser.NewScanner(expected))30 if !assert.NoError(t, err, "parsing expected: %s", expected) {31 return false32 }33 expectedExpr, err := pc.CompileExpr(ctx, ast)34 require.NoError(t, err)35 ast, err = pc.Parse(ctx, parser.NewScanner(code))36 if !assert.NoError(t, err, "parsing code: %s", code) {37 return false38 }39 codeExpr, err := pc.CompileExpr(ctx, ast)40 require.NoError(t, err)41 value, err := codeExpr.Eval(ctx, rel.Scope{})42 if !assert.NoError(t, err, "evaluating expected: %s", expected) {43 return false44 }45 // log.Printf("code=%v, codeExpr=%v", code, codeExpr)46 if !rel.AssertExprsEvalToSameValue(t, expectedExpr, value) {47 t.Errorf("\nexpected: %s\ncode: %s", expected, code)48 return false49 }50 return true51}52// RequireCodesEvalToSameValue requires that code evaluates to the same value as53// expected.54func RequireCodesEvalToSameValue(t *testing.T, expected string, code string) {55 t.Helper()56 pc := ParseContext{SourceDir: ".."}57 ctx := arraictx.InitRunCtx(context.Background())58 ast, err := pc.Parse(ctx, parser.NewScanner(expected))59 require.NoError(t, err)60 expectedExpr, err := pc.CompileExpr(ctx, ast)61 require.NoError(t, err)62 ast, err = pc.Parse(ctx, parser.NewScanner(code))63 require.NoError(t, err)64 codeExpr, err := pc.CompileExpr(ctx, ast)65 require.NoError(t, err)66 rel.AssertExprsEvalToSameValue(t, expectedExpr, codeExpr)67}68// AssertCodeEvalsToType asserts that code evaluates to the same type as expected.69func AssertCodeEvalsToType(t *testing.T, expected interface{}, code string) bool {70 t.Helper()71 pc := ParseContext{SourceDir: ".."}72 ctx := arraictx.InitRunCtx(context.Background())73 ast, err := pc.Parse(ctx, parser.NewScanner(code))74 if !assert.NoError(t, err, "parsing code: %s", code) {75 return false76 }77 codeExpr, err := pc.CompileExpr(ctx, ast)78 require.NoError(t, err)79 if !rel.AssertExprEvalsToType(t, expected, codeExpr) {80 t.Errorf("\nexpected: %T\ncode: %s", expected, code)81 return false82 }83 return true84}85// AssertCodeEvalsToGrammar asserts that code evaluates to a grammar equal to expected.86func AssertCodeEvalsToGrammar(t *testing.T, expected parser.Grammar, code string) {87 t.Helper()88 pc := ParseContext{SourceDir: ".."}89 ctx := arraictx.InitRunCtx(context.Background())90 astElt := pc.MustParseString(ctx, code)91 astExpr, err := pc.CompileExpr(ctx, astElt)92 require.NoError(t, err)93 astValue, err := astExpr.Eval(ctx, rel.EmptyScope)94 assert.NoError(t, err, "parsing code: %s", code)95 astNode := rel.ASTNodeFromValue(astValue).(ast.Branch)96 astGrammar := wbnf.NewFromAst(astNode)97 assert.EqualValues(t, expected, astGrammar)98}99// AssertCodePanics asserts that code panics when executed.100// TODO: Remove this. Should only intentionally panic for implementation bugs.101func AssertCodePanics(t *testing.T, code string) bool {102 t.Helper()103 return assert.Panics(t, func() {104 pc := ParseContext{SourceDir: ".."}105 ctx := arraictx.InitRunCtx(context.Background())106 ast, err := pc.Parse(ctx, parser.NewScanner(code))107 if assert.NoError(t, err, "parsing code: %s", code) {108 codeExpr, err := pc.CompileExpr(ctx, ast)109 require.NoError(t, err)110 codeExpr.Eval(ctx, rel.EmptyScope) //nolint:errcheck111 }112 })113}114// AssertCodeParseErrors asserts that code fails with a certain115// message when parsed.116func AssertCodeParseErrors(t *testing.T, errString, code string) bool {117 t.Helper()118 pc := ParseContext{SourceDir: ".."}119 ctx := arraictx.InitRunCtx(context.Background())120 _, err := pc.Parse(ctx, parser.NewScanner(code))121 return assert.Error(t, err) &&122 assert.EqualError(t, errors.New(err.Error()[:len(errString)]), errString)123}124// AssertCodeErrors asserts that code fails with a certain125// message when executed.126func AssertCodeErrors(t *testing.T, errString, code string) bool {127 t.Helper()128 pc := ParseContext{SourceDir: ".."}129 ctx := arraictx.InitRunCtx(context.Background())130 ast, err := pc.Parse(ctx, parser.NewScanner(code))131 if assert.NoError(t, err, "parsing code: %s", code) {132 codeExpr, err := pc.CompileExpr(ctx, ast)133 if err != nil {134 return assert.EqualError(t, errors.New(err.Error()[:len(errString)]), errString)135 }136 _, err = codeExpr.Eval(ctx, rel.EmptyScope)137 return assert.Error(t, err) &&138 assert.EqualError(t, errors.New(err.Error()[:len(errString)]), errString)139 }140 return false141}142// AssertScan asserts that a lexer's next produced token is as expected.143func AssertScan(t *testing.T, l *Lexer, tok Token, intf interface{}, lexeme string) bool {144 t.Helper()145 if !assert.True(t, l.Scan()) {146 return false147 }148 if !assert.Equal(149 t, TokenRepr(tok), TokenRepr(l.Token()), "%s", l,150 ) {151 return false152 }153 if intf == nil {154 if !assert.Nil(t, l.Value()) {155 return false156 }157 } else {158 value, err := rel.NewValue(intf)159 require.NoError(t, err)160 if !assert.True(161 t, value.Equal(l.Value()), "%s == %s", value, l.Value(),162 ) {163 return false164 }165 }166 return assert.Equal(t, lexeme, lexeme, l)167}168// AssertEvalExprString asserts Expr string.169func AssertEvalExprString(t *testing.T, expected, source string) bool {170 t.Helper()171 expr, err := Compile(arraictx.InitRunCtx(context.Background()), ".", source)172 return assert.NoError(t, err) &&173 assert.NotNil(t, expr) &&174 assert.Equal(t, expected, expr.String())175}176func MustAbs(t *testing.T, filePath string) string {177 t.Helper()178 abs, err := filepath.Abs(filePath)179 require.NoError(t, err)180 return abs181}...

Full Screen

Full Screen

address_test.go

Source:address_test.go Github

copy

Full Screen

1package tests2import (3 "bufio"4 "github.com/avidya/sed-go/interpreter"5 "github.com/avidya/sed-go/parser"6 "github.com/stretchr/testify/assert"7 "strings"8 "testing"9)10func TestSingleAddress(t *testing.T) {11 ctx := parser.ParseExpression("2 s/a/b/", false)12 ec := &parser.ExecutionContext{13 CurrentAST: ctx.AST,14 Debug: true,15 }16 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\na\na")))17 (assert.New(t)).True(AssertContent("a\nb\na"))18}19func TestSingleAddressNegative(t *testing.T) {20 ctx := parser.ParseExpression("2! s/a/b/", false)21 ec := &parser.ExecutionContext{22 CurrentAST: ctx.AST,23 Debug: true,24 }25 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\na\na")))26 (assert.New(t)).True(AssertContent("b\na\nb"))27}28func TestRangeMatch(t *testing.T) {29 ctx := parser.ParseExpression("\\x<p>x,\\y</p>yp", false)30 ec := &parser.ExecutionContext{31 CurrentAST: ctx.AST,32 Debug: true,33 }34 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\n<p>\nb\nc\n</p>\ne\n<p>\nf\ng\n</p>\nh")))35 (assert.New(t)).True(AssertContent("a\n<p>\n<p>\nb\nb\nc\nc\n</p>\n</p>\ne\n<p>\n<p>\nf\nf\ng\ng\n</p>\n</p>\nh"))36}37func TestRangeMatchSecondMismatch(t *testing.T) {38 ctx := parser.ParseExpression("\\x<p>x,/<\\/P>/p", false)39 ec := &parser.ExecutionContext{40 CurrentAST: ctx.AST,41 Debug: true,42 }43 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\n<p>\nb\nc\n</p>\ne\n<p>\nf\ng\n</p>\nh")))44 (assert.New(t)).True(AssertContent("a\n<p>\n<p>\nb\nb\nc\nc\n</p>\n</p>\ne\ne\n<p>\n<p>\nf\nf\ng\ng\n</p>\n</p>\nh\nh"))45}46func TestRangeMatchSecondMismatchNegative(t *testing.T) {47 ctx := parser.ParseExpression("\\x<p>x,/<\\/P>/!p", false)48 ec := &parser.ExecutionContext{49 CurrentAST: ctx.AST,50 Debug: true,51 }52 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\n<p>\nb\nc\n</p>\ne\n<p>\nf\ng\n</p>\nh")))53 (assert.New(t)).True(AssertContent("a\na\n<p>\nb\nc\n</p>\ne\n<p>\nf\ng\n</p>\nh"))54}55func TestRangeMSingle(t *testing.T) {56 ctx := parser.ParseExpression("\\xbxs//B/p", false)57 ec := &parser.ExecutionContext{58 CurrentAST: ctx.AST,59 Debug: true,60 }61 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\n<p>\nb\nc\n</p>\ne\n<p>\nf\ng\n</p>\nh")))62 (assert.New(t)).True(AssertContent("a\n<p>\nB\nB\nc\n</p>\ne\n<p>\nf\ng\n</p>\nh"))63}64func TestRangeMSingle2(t *testing.T) {65 ctx := parser.ParseExpression("\\b\\bb s//B/p", false)66 ec := &parser.ExecutionContext{67 CurrentAST: ctx.AST,68 Debug: true,69 }70 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\n<p>\nb\nc\n</p>\ne\n<p>\nf\ng\n</p>\nh")))71 (assert.New(t)).True(AssertContent("a\n<p>\nB\nB\nc\n</p>\ne\n<p>\nf\ng\n</p>\nh"))72}73func TestRangeMSingleError(t *testing.T) {74 defer func() {75 if r := recover(); r != nil {76 assert.New(t).True(true)77 }78 }()79 parser.ParseExpression("\\b\\bbs//B/p'", false)80 assert.New(t).True(false)81}82func TestRelativeRange(t *testing.T) {83 ctx := parser.ParseExpression("2,+1 s/.*/XX/", false)84 ec := &parser.ExecutionContext{85 CurrentAST: ctx.AST,86 Debug: true,87 }88 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\nb\nc\nd")))89 (assert.New(t)).True(AssertContent("a\nXX\nXX\nd"))90}91func TestRelativeRangeNegative(t *testing.T) {92 ctx := parser.ParseExpression("2,+1! s/.*/XX/", false)93 ec := &parser.ExecutionContext{94 CurrentAST: ctx.AST,95 Debug: true,96 }97 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\nb\nc")))98 (assert.New(t)).True(AssertContent("XX\nb\nc"))99}100func TestEndRange(t *testing.T) {101 ctx := parser.ParseExpression("$ s/.*/XX/", false)102 ec := &parser.ExecutionContext{103 CurrentAST: ctx.AST,104 Debug: true,105 }106 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("a\nb\nc")))107 (assert.New(t)).True(AssertContent("a\nb\nXX"))108}109func TestEndRangeNegative(t *testing.T) {110 ctx := parser.ParseExpression("$! s/.*/XX/", false)111 ec := &parser.ExecutionContext{112 CurrentAST: ctx.AST,113 Debug: true,114 }115 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("XX\nXX\nc")))116}...

Full Screen

Full Screen

substitute_test.go

Source:substitute_test.go Github

copy

Full Screen

1package tests2import (3 "bufio"4 "github.com/avidya/sed-go/interpreter"5 "github.com/avidya/sed-go/parser"6 "github.com/stretchr/testify/assert"7 "strings"8 "testing"9)10func TestEvalSub_Simple(t *testing.T) {11 ctx := parser.ParseExpression("s/a/b/", false)12 ec := &parser.ExecutionContext{13 CurrentAST: ctx.AST,14 }15 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("abc")))16 assert := assert.New(t)17 assert.True(ec.PatternSpace == "bbc")18}19func TestEvalSub_Global(t *testing.T) {20 ctx := parser.ParseExpression("s/a/b/g", false)21 ec := &parser.ExecutionContext{22 CurrentAST: ctx.AST,23 }24 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("aaa")))25 assert := assert.New(t)26 assert.True(ec.PatternSpace == "bbb")27}28func TestEvalSub_Occurrence(t *testing.T) {29 ctx := parser.ParseExpression("s/a/b/2", false)30 ec := &parser.ExecutionContext{31 CurrentAST: ctx.AST,32 }33 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("aaa")))34 assert := assert.New(t)35 assert.True(ec.PatternSpace == "aba")36 ctx = parser.ParseExpression("s/a/b/2g", false)37 ec = &parser.ExecutionContext{38 CurrentAST: ctx.AST,39 }40 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("aaa")))41 assert.True(ec.PatternSpace == "abb")42}43func TestEvalSub_BackreferenceAndAmpersand(t *testing.T) {44 ctx := parser.ParseExpression("s/(ab).?/\\1_&z/", false)45 ec := &parser.ExecutionContext{46 CurrentAST: ctx.AST,47 }48 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("abc-vabz")))49 assert := assert.New(t)50 assert.True(ec.PatternSpace == "ab_abcz-vabz")51 // escape the Ampersand52 ctx = parser.ParseExpression("s/(ab).?/\\1_\\&z/", false)53 ec = &parser.ExecutionContext{54 CurrentAST: ctx.AST,55 }56 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("abc-vabz")))57 assert.True(ec.PatternSpace == "ab_&z-vabz")58 // escape the Ampersand, and replace the second match part59 ctx = parser.ParseExpression("s/(ab).?/\\1_\\&z/2", false)60 ec = &parser.ExecutionContext{61 CurrentAST: ctx.AST,62 }63 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("abc-vabz")))64 assert.True(ec.PatternSpace == "abc-vab_&z")65 // complex global66 ctx = parser.ParseExpression("s/(ab).?/\\1_&z/g", false)67 ec = &parser.ExecutionContext{68 CurrentAST: ctx.AST,69 }70 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("abc-vabz")))71 assert.True(ec.PatternSpace == "ab_abcz-vab_abzz")72 ctx = parser.ParseExpression("s/(ab).?/\\\\1_&z/", false)73 ec = &parser.ExecutionContext{74 CurrentAST: ctx.AST,75 }76 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("abc-vabz")))77 assert.True(ec.PatternSpace == "\\1_abcz-vabz")78}79func TestEvalSub_DelimiterOtherThanSlash(t *testing.T) {80 ctx := parser.ParseExpression("s*(ab).?*\\1_&z*", false)81 ec := &parser.ExecutionContext{82 CurrentAST: ctx.AST,83 }84 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("abc-vabz")))85 assert := assert.New(t)86 assert.True(ec.PatternSpace == "ab_abcz-vabz")87}88func TestEvalSub_IgnoreCase(t *testing.T) {89 ctx := parser.ParseExpression("s/B/BEE/i", false)90 ec := &parser.ExecutionContext{91 CurrentAST: ctx.AST,92 }93 interpreter.Eval(ec, *bufio.NewScanner(strings.NewReader("abc")))94 assert := assert.New(t)95 assert.True(ec.PatternSpace == "aBEEc")96}...

Full Screen

Full Screen

newScanner

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 f, err := parser.ParseFile(fset, "1.go", nil, parser.ParseComments)4 if err != nil {5 fmt.Println(err)6 }7 ast.Print(fset, f)8}9import "fmt"10func main() {11 fmt.Println("Hello, world.")12}

Full Screen

Full Screen

newScanner

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fset := token.NewFileSet()4 f, err := parser.ParseFile(fset, "test.go", nil, parser.ParseComments)5 if err != nil {6 fmt.Println(err)7 }8 ast.Inspect(f, func(n ast.Node) bool {9 if n == nil {10 }11 switch x := n.(type) {12 fmt.Println("AssignStmt")13 fmt.Println(x.Tok)14 for _, expr := range x.Lhs {15 fmt.Println(expr)16 }17 for _, expr := range x.Rhs {18 fmt.Println(expr)19 }20 fmt.Println("BasicLit")21 fmt.Println(x.Value)22 fmt.Println("BinaryExpr")23 fmt.Println(x.Op)24 fmt.Println(x.X)25 fmt.Println(x.Y)26 fmt.Println("BlockStmt")27 fmt.Println("BranchStmt")28 fmt.Println(x.Tok)29 fmt.Println("CallExpr")30 fmt.Println(x.Fun)31 for _, expr := range x.Args {32 fmt.Println(expr)33 }34 fmt.Println("CaseClause")35 fmt.Println("ChanType")36 fmt.Println("CommClause")37 fmt.Println("Comment")38 fmt.Println(x.Text)39 fmt.Println("CommentGroup")40 fmt.Println("DeclStmt")41 fmt.Println("DeferStmt")42 fmt.Println("Ellipsis")43 fmt.Println("EmptyStmt")44 fmt.Println("ExprStmt")45 fmt.Println("Field")46 fmt.Println("FieldList")47 fmt.Println("File")48 fmt.Println("ForStmt")49 fmt.Println("FuncDecl")

Full Screen

Full Screen

newScanner

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 f, err := parser.ParseFile(fset, "hello.go", nil, 0)4 if err != nil {5 fmt.Println(err)6 }7 ast.Print(fset, f)8 ast.Fprint(os.Stdout, fset, f, nil)9 ast.Fprint(os.Stdout, fset, f, nil)10 ast.Fprint(os.Stdout, fset, f, nil)11 ast.Fprint(os.Stdout, fset, f, nil)12 ast.Fprint(os.Stdout, fset, f, nil)13 ast.Fprint(os.Stdout, fset, f, nil)

Full Screen

Full Screen

newScanner

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fset := token.NewFileSet()4 f, err := parser.ParseFile(fset, "1.go", nil, parser.ImportsOnly)5 if err != nil {6 panic(err)7 }8 for _, s := range f.Imports {9 fmt.Println(s.Path.Value)10 }11}12import (13func main() {14 fset := token.NewFileSet()15 f, err := parser.ParseFile(fset, "1.go", nil, parser.ImportsOnly)16 if err != nil {17 panic(err)18 }19 for _, s := range f.Imports {20 fmt.Println(s.Path.Value)21 }22}23import (24func main() {25 fset := token.NewFileSet()26 f, err := parser.ParseFile(fset, "1.go", nil, parser.ImportsOnly)27 if err != nil {28 panic(err)29 }30 for _, s := range f.Imports {31 fmt.Println(s.Path.Value)32 }33}34import (35func main() {36 fset := token.NewFileSet()37 f, err := parser.ParseFile(fset, "1.go", nil, parser.ImportsOnly)38 if err != nil {39 panic(err)

Full Screen

Full Screen

newScanner

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fset := token.NewFileSet()4import "fmt"5func main() {6 fmt.Println("Hello, world!")7}8 f, err := parser.ParseFile(fset, "", src, 0)9 if err != nil {10 fmt.Println(err)11 }12 ast.Print(fset, f)13 scanner := ast.NewScanner()14 scanner.Init(f, true, nil)15 for scanner.Scan() {16 fmt.Println(reflect.TypeOf(scanner.Node()))17 }18}19The ast.Scanner.Init() method initializes the scanner to use node as the root node of the AST to be scanned. The scanner is initialized with the first node of the AST if init is true; otherwise it

Full Screen

Full Screen

newScanner

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fset := token.NewFileSet()4 f, err := parser.ParseFile(fset, "test.go", nil, parser.ParseComments)5 if err != nil {6 log.Fatal(err)7 }8 for _, s := range f.Imports {9 fmt.Println(s.Path.Value)10 }11 for _, cg := range f.Comments {12 for _, c := range cg.List {13 fmt.Println(c.Text)14 }15 }16 fmt.Println(f)17 ast.Print(fset, f)18 ast.Print(fset, f, ast.NodeFilterFunc(func(n ast.Node) bool {19 _, isPkg := n.(*ast.Package)20 }))21 ast.Print(fset, f, ast.NodeFilterFunc(func(n ast.Node) bool {22 _, isPkg := n.(*ast.Package)23 _, isImport := n.(*ast.ImportSpec)24 }))25 ast.Print(fset, f, ast.NodeFilterFunc(func(n ast.Node) bool {26 _, isPkg := n.(*ast.Package)27 _, isImport := n.(*ast.ImportSpec)28 }), ast.NodePrintFilterFunc(func(n ast.Node) bool {29 _, isImport := n.(*ast.ImportSpec)30 }))31 ast.Print(fset, f, ast.NodeFilterFunc(func(n ast.Node) bool {

Full Screen

Full Screen

newScanner

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 err := filepath.Walk(path, walk)4 if err != nil {5 fmt.Println(err)6 }7}8func walk(path string, info os.FileInfo, err error) error {9 if err != nil {10 fmt.Println(err)11 }12 if !info.IsDir() {13 if filepath.Ext(path) == ".go" {14 lines := getLines(path)15 fmt.Println(path, "has", lines, "lines of code")16 }17 }18}19func getLines(path string) int {20 fset := token.NewFileSet()21 f, err := parser.ParseFile(fset, path, nil, parser.ParseComments)22 if err != nil {23 fmt.Println(err)24 }25 scanner := ast.NewCommentMap(fset, f, f.Comments)26 for _, token := range tokens {27 for _, comment := range token {28 lines += countLines(comment.Text)29 }30 }31}32func countLines(text string) int {33 for _, char := range text {34' {35 }36 }37}

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful