Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
02172546
Commit
02172546
authored
Sep 07, 2013
by
Dmitri Shubin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make capnp-test.sh compatible with Solaris sh(1), test(1) and cmp(1)
parent
9bf6b1ac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
capnp-test.sh
c++/src/capnp/compiler/capnp-test.sh
+15
-15
No files found.
c++/src/capnp/compiler/capnp-test.sh
View file @
02172546
...
@@ -31,30 +31,30 @@ fail() {
...
@@ -31,30 +31,30 @@ fail() {
exit
1
exit
1
}
}
if
test
-
e
./capnp
;
then
if
test
-
f
./capnp
;
then
CAPNP
=
${
CAPNP
:-
./capnp
}
CAPNP
=
${
CAPNP
:-
./capnp
}
else
else
CAPNP
=
${
CAPNP
:-
capnp
}
CAPNP
=
${
CAPNP
:-
capnp
}
fi
fi
SCHEMA
=
$(
dirname
"
$0
"
)
/../test.capnp
SCHEMA
=
`
dirname
"
$0
"
`
/../test.capnp
TESTDATA
=
$(
dirname
"
$0
"
)
/../testdata
TESTDATA
=
`
dirname
"
$0
"
`
/../testdata
$CAPNP
encode
$SCHEMA
TestAllTypes <
$TESTDATA
/short.txt | cmp
$TESTDATA
/binary
||
fail encode
$CAPNP
encode
$SCHEMA
TestAllTypes <
$TESTDATA
/short.txt | cmp
$TESTDATA
/binary
-
||
fail encode
$CAPNP
encode
--flat
$SCHEMA
TestAllTypes <
$TESTDATA
/short.txt | cmp
$TESTDATA
/flat
||
fail encode flat
$CAPNP
encode
--flat
$SCHEMA
TestAllTypes <
$TESTDATA
/short.txt | cmp
$TESTDATA
/flat
-
||
fail encode flat
$CAPNP
encode
--packed
$SCHEMA
TestAllTypes <
$TESTDATA
/short.txt | cmp
$TESTDATA
/packed
||
fail encode packed
$CAPNP
encode
--packed
$SCHEMA
TestAllTypes <
$TESTDATA
/short.txt | cmp
$TESTDATA
/packed
-
||
fail encode packed
$CAPNP
encode
$SCHEMA
TestAllTypes <
$TESTDATA
/pretty.txt | cmp
$TESTDATA
/binary
||
fail parse pretty
$CAPNP
encode
$SCHEMA
TestAllTypes <
$TESTDATA
/pretty.txt | cmp
$TESTDATA
/binary
-
||
fail parse pretty
$CAPNP
decode
$SCHEMA
TestAllTypes <
$TESTDATA
/binary | cmp
$TESTDATA
/pretty.txt
||
fail decode
$CAPNP
decode
$SCHEMA
TestAllTypes <
$TESTDATA
/binary | cmp
$TESTDATA
/pretty.txt
-
||
fail decode
$CAPNP
decode
--flat
$SCHEMA
TestAllTypes <
$TESTDATA
/flat | cmp
$TESTDATA
/pretty.txt
||
fail decode flat
$CAPNP
decode
--flat
$SCHEMA
TestAllTypes <
$TESTDATA
/flat | cmp
$TESTDATA
/pretty.txt
-
||
fail decode flat
$CAPNP
decode
--packed
$SCHEMA
TestAllTypes <
$TESTDATA
/packed | cmp
$TESTDATA
/pretty.txt
||
fail decode packed
$CAPNP
decode
--packed
$SCHEMA
TestAllTypes <
$TESTDATA
/packed | cmp
$TESTDATA
/pretty.txt
-
||
fail decode packed
$CAPNP
decode
--short
$SCHEMA
TestAllTypes <
$TESTDATA
/binary | cmp
$TESTDATA
/short.txt
||
fail decode short
$CAPNP
decode
--short
$SCHEMA
TestAllTypes <
$TESTDATA
/binary | cmp
$TESTDATA
/short.txt
-
||
fail decode short
$CAPNP
decode
$SCHEMA
TestAllTypes <
$TESTDATA
/segmented | cmp
$TESTDATA
/pretty.txt
||
fail decode segmented
$CAPNP
decode
$SCHEMA
TestAllTypes <
$TESTDATA
/segmented | cmp
$TESTDATA
/pretty.txt
-
||
fail decode segmented
$CAPNP
decode
--packed
$SCHEMA
TestAllTypes <
$TESTDATA
/segmented-packed | cmp
$TESTDATA
/pretty.txt
||
fail decode segmented-packed
$CAPNP
decode
--packed
$SCHEMA
TestAllTypes <
$TESTDATA
/segmented-packed | cmp
$TESTDATA
/pretty.txt
-
||
fail decode segmented-packed
test_eval
()
{
test_eval
()
{
test
"x
$(
$CAPNP
eval
$SCHEMA
$1
)
"
=
"x
$2
"
||
fail
eval
"
$1
==
$2
"
test
"x
`
$CAPNP
eval
$SCHEMA
$1
`
"
=
"x
$2
"
||
fail
eval
"
$1
==
$2
"
}
}
test_eval TestDefaults.uInt32Field 3456789012
test_eval TestDefaults.uInt32Field 3456789012
...
@@ -66,4 +66,4 @@ test_eval TestConstants.enumConst corge
...
@@ -66,4 +66,4 @@ test_eval TestConstants.enumConst corge
test_eval
'TestListDefaults.lists.int32ListList[2][0]'
12341234
test_eval
'TestListDefaults.lists.int32ListList[2][0]'
12341234
$CAPNP
compile
-ofoo
$TESTDATA
/errors.capnp.nobuild 2>&1 |
sed
-e
"s,^.*/errors[.]capnp[.]nobuild,file,g"
|
$CAPNP
compile
-ofoo
$TESTDATA
/errors.capnp.nobuild 2>&1 |
sed
-e
"s,^.*/errors[.]capnp[.]nobuild,file,g"
|
cmp
$TESTDATA
/errors.txt
||
fail error output
cmp
$TESTDATA
/errors.txt
-
||
fail error output
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