Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
Zipr Toolchain
Commits
70d0a34b
Commit
70d0a34b
authored
13 years ago
by
an7s
Browse files
Options
Downloads
Patches
Plain Diff
new version
parent
8aad4897
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/ls_manual_tests.sh
+15
-37
15 additions, 37 deletions
examples/ls_manual_tests.sh
with
15 additions
and
37 deletions
examples/ls_manual_tests.sh
+
15
−
37
View file @
70d0a34b
#!/bin/sh
# input/output specification for testing
#
# input/output specification for testing ls
#
# assumptions:
# - deterministic tests
...
...
@@ -12,54 +13,31 @@
# - timestamp info will differ b/c we're copying files around as part of manual_test_import
#
echo
"hello"
>
i1
echo
"hello"
>
i
nputfile
1
# basic functionality -- don't bother with comparing outputs
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar"
--prog
foobar
# test invalid options
ls
-MX
i1 |
grep
-vi
invalid |
grep
-vi
usage
>
o1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -MX i1 | grep -vi invalid | grep -vi usage > o1"
--prog
foobar
--infile
i1
--outfile
o
1
ls
-MX
i
nputfile
1 |
grep
-vi
invalid |
grep
-vi
usage
>
o
utputfile
1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -MX i
nputfile
1 | grep -vi invalid | grep -vi usage > o
utputfile
1"
--prog
foobar
--infile
i
nputfile
1
--outfile
o
utputfile1
--name
invalid_options
# test help
ls
--help
|
grep
-vi
report |
grep
-vi
usage
>
o1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar --help | grep -vi report | grep -vi usage > o1"
--prog
foobar
--outfile
o
1
ls
--help
|
grep
-vi
report |
grep
-vi
usage
>
o
utputfile
1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar --help | grep -vi report | grep -vi usage > o
utputfile
1"
--prog
foobar
--outfile
o
utputfile1
--name
usage
# test some option flags
ls
-kfsZqp
i
1
>
o
1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -kfsZqp i
1 > o
1"
--prog
foobar
--infile
i1
--outfile
o1
ls
-kfsZqp
i
nputfile1
>
outputfile
1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -kfsZqp i
nputfile1 > outputfile
1"
--prog
foobar
--infile
i
nputfile
1
--outfile
outputfile1
--name
flag_comb
o1
# test --ignore
ls
--ignore
=
hello i
1
>
o
1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar --ignore=hello i
1 > o
1"
--prog
foobar
--infile
i1
--outfile
o
1
ls
--ignore
=
hello i
nputfile1
>
outputfile
1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar --ignore=hello i
nputfile1 > outputfile
1"
--prog
foobar
--infile
i
nputfile
1
--outfile
o
utputfile1
--name
ignore
# test whole bunch of options -- output is non-deterministic so we just make sure we have the same number of lines
ls
-ltarHksbBiXR
i1 |
wc
-l
>
o1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -ltarHksbBiXR i1 | wc -l > o1"
--prog
foobar
--infile
i1
--outfile
o1
# also when something goes wrong during testing, the program usually just crashes
ls
-ltarHksbBiXR
inputfile1 |
wc
-l
>
outputfile1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -ltarHksbBiXR inputfile1 | wc -l > outputfile1"
--prog
foobar
--infile
inputfile1
--outfile
outputfile1
--name
shload_flags
# cleanup
rm
i1 o1
exit
0
#
# enough testing for now
#
ls
-aw
i1
>
o1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -aw i1 > o1"
--prog
foobar
--infile
i1
--outfile
o1
ls
-R
.
>
o1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -R . > o1"
--prog
foobar
--outfile
o1
ls
-hBG
.
>
o1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -hBG . > o1"
--prog
foobar
--outfile
o1
ls
-m
.
>
o1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -m . > o1"
--prog
foobar
--outfile
o1
ls
-X
.
>
o1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -X . > o1"
--prog
foobar
--outfile
o1
ls
-x
.
>
o1
$PEASOUP_HOME
/tools/manual_test_import.sh
--cmd
"./foobar -x . > o1"
--prog
foobar
--outfile
o1
rm
inputfile1 outputfile1
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment