Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
baac04b5
Commit
baac04b5
authored
Oct 20, 2008
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable tests that verify that pretty-printed code can be compiled with 6g again
R=r OCL=17510 CL=17510
parent
6ae1df9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
usr/gri/pretty/test.sh
usr/gri/pretty/test.sh
+23
-12
No files found.
usr/gri/pretty/test.sh
View file @
baac04b5
...
...
@@ -17,13 +17,26 @@ count() {
}
# apply to one file
apply1
()
{
#echo $1 $2
$1
$2
count
case
`
basename
$F
`
in
selftest.go
|
func3.go
)
;;
# skip - these are test cases for syntax errors
*
)
$1
$2
;
count
;;
esac
}
# apply to local files
applydot
()
{
for
F
in
*
.go
do
apply1
$1
$F
done
}
# apply to all files in the list
apply
()
{
for
F
in
\
$GOROOT
/usr/gri/pretty/
*
.go
\
...
...
@@ -34,10 +47,7 @@ apply() {
$GOROOT
/src/lib/
*
/
*
.go
\
$GOROOT
/usr/r/
*
/
*
.go
do
case
`
basename
$F
`
in
selftest.go
|
func3.go
)
;;
# skip - these are test cases for syntax errors
*
)
apply1
$1
$F
;;
esac
apply1
$1
$F
done
}
...
...
@@ -85,21 +95,22 @@ valid() {
runtest
()
{
#echo "Testing silent mode"
cleanup
$1
silent
$2
$1
silent
#echo "Testing idempotency"
cleanup
$1
idempotent
$2
#echo "Testing validity"
#cleanup
#$1 valid $2
$1
idempotent
}
runtests
()
{
if
[
$#
==
0
]
;
then
runtest apply
# verify the pretty-printed files can be compiled with 6g again
# do it in local directory only because of the prerequisites required
#echo "Testing validity"
cleanup
applydot valid
else
for
F
in
$*
;
do
runtest apply1
$F
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment