1// $G $F.go && $L $F.$A && ./$A.out arg1 arg2 2 3// NOTE: This test is not run by 'run.go' and so not run by all.bash. 4// To run this test you must use the ./run shell script. 5 6// Copyright 2009 The Go Authors. All rights reserved. 7// Use of this source code is governed by a BSD-style 8// license that can be found in the LICENSE file. 9 10// Test os.Args. 11 12package main 13 14import "os" 15 16func main() { 17 if len(os.Args) != 3 { 18 panic("argc") 19 } 20 if os.Args[1] != "arg1" { 21 panic("arg1") 22 } 23 if os.Args[2] != "arg2" { 24 panic("arg2") 25 } 26} 27