-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Batch #12 of longoptions test scripts.
- Loading branch information
Showing
4 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test subplot longopts translation. | ||
|
||
m=subplot | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -Asometag+c1/2+gred+jBC | ||
--l2stranstest -A+jMR+o1/2+p2p,blue+r+v | ||
--l2stranstest -A+R+s1/2/gray+v | ||
--l2stranstest -Cw1 -Cw2 -Ce3 | ||
--l2stranstest -Ce4 -Cn5 -Cn6 | ||
--l2stranstest -Cx7 -Cy8 | ||
--l2stranstest -D | ||
--l2stranstest -Ff1/2+af+c1/2+gblue | ||
--l2stranstest -Ff3/4+f3,1/1,2+pblack | ||
--l2stranstest -Fs5/6+f3,1/1,2+pblue+wblack | ||
--l2stranstest -Fs1/2+wblack -Fs7/8 | ||
--l2stranstest -M1/2/3/4 | ||
--l2stranstest -Srt+lmylbl+syourlbl -Sc+p | ||
--l2stranstest -Scols:b+tc | ||
--l2stranstest -T"My Overarching Heading" | ||
EOF | ||
|
||
# module-specific longopts | ||
# (note 'gmt {begin,end}' bracketing as module not available in classic mode) | ||
gmt begin | ||
gmt $m $l2s --autolabel=sometag+clearance:1/2+fill:red+justify:BC >> $b | ||
gmt $m $l2s --autolabel+anchor:MR+offset:1/2+pen:2p,blue+roman+vtag >> $b | ||
gmt $m $l2s --autolabel+Roman+shaded:1/2/gray+vertical >> $b | ||
gmt $m $l2s --clearance=w:1 --clearance=west:2 --clearance=e:3 >> $b | ||
gmt $m $l2s --clearance=east:4 --clearance=n:5 --clearance=north:6 >> $b | ||
gmt $m $l2s --clearance=x:7 --clearance=y:8 >> $b | ||
gmt $m $l2s --defaults >> $b | ||
gmt $m $l2s --dimensions=overall:1/2+scale:f+expand:1/2+fill:blue >> $b | ||
gmt $m $l2s --dims=figsize:3/4+fractions:3,1/1,2+perimeter:black >> $b | ||
gmt $m $l2s --dims=subplot:5/6+frac:3,1/1,2+outline:blue+dividers:black >> $b | ||
gmt $m $l2s --dims=subsize:1/2+divlines:black --dims=panels:7/8 >> $b | ||
gmt $m $l2s --margins=1/2/3/4 >> $b | ||
gmt $m $l2s --share=rows:t+label:mylbl+label2:yourlbl --share=x+parallel >> $b | ||
gmt $m $l2s --share=cols:b+row_title:c >> $b | ||
gmt $m $l2s --title='My Overarching Heading' >> $b | ||
gmt end | ||
|
||
diff $a $b --strip-trailing-cr > fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test trend1d longopts translation. | ||
|
||
m=trend1d | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -C1.2e03 -C2 | ||
--l2stranstest -Fxymrw -Fp | ||
--l2stranstest -FP -Fc | ||
--l2stranstest -I0.5 -I0.8 | ||
--l2stranstest -Np5,f3,C6+l1+o2+r | ||
--l2stranstest -W+s | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --condition=1.2e03 --condition_number=2 >> $b | ||
gmt $m $l2s --output=x,y,model,residual,weight --output=polynomial >> $b | ||
gmt $m $l2s --output=npolynomial --output=chebyshev >> $b | ||
gmt $m $l2s --confidence=0.5 --conf_level=0.8 >> $b | ||
gmt $m $l2s --model=p5,f3,C6+length:1+origin:2+robust >> $b | ||
gmt $m $l2s --weights+uncertainties >> $b | ||
|
||
diff $a $b --strip-trailing-cr > fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test trend2d longopts translation. | ||
|
||
m=trend2d | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -C1.2e03 -C2 | ||
--l2stranstest -Fxymrw | ||
--l2stranstest -Fp -Fp | ||
--l2stranstest -I0.5 -I0.8 | ||
--l2stranstest -N4+r -N5 | ||
--l2stranstest -W+s -W+w | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --condition=1.2e03 --condition_number=2 >> $b | ||
gmt $m $l2s --output=x,y,model,residual,weight >> $b | ||
gmt $m $l2s --output=params --output=parameters >> $b | ||
gmt $m $l2s --confidence=0.5 --conf_level=0.8 >> $b | ||
gmt $m $l2s --nterms=4+robust --model=5 >> $b | ||
gmt $m $l2s --weights+uncertainties --weights+weights >> $b | ||
|
||
diff $a $b --strip-trailing-cr > fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test xyz2grd longopts translation. | ||
|
||
m=xyz2grd | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -Ad -Af -Al | ||
--l2stranstest -Am -An -Ar | ||
--l2stranstest -As -AS -Au | ||
--l2stranstest -Az | ||
--l2stranstest -D+c/some.cpt+dsillydata+n-99 | ||
--l2stranstest -D"+c-+o1+rSmart Grid" | ||
--l2stranstest -D"+s2+tBest Grid Ever+vmyvar" | ||
--l2stranstest -D+xDr.X+yDr.Y+zDr.Z | ||
--l2stranstest -G/some/file.grd=nf+d2+n-99 | ||
--l2stranstest -G/other/file.grd=nf+o6+s1.5 | ||
--l2stranstest -I5+e/10 -I2 -I1/2+n | ||
--l2stranstest -S -S | ||
--l2stranstest -ZTLax | ||
--l2stranstest -ZBRAyw | ||
--l2stranstest -ZTRcw -ZBLc | ||
--l2stranstest -ZTLu -ZTLu | ||
--l2stranstest -ZTLh -ZTLh | ||
--l2stranstest -ZTLH -ZTLH | ||
--l2stranstest -ZTLi -ZTLi | ||
--l2stranstest -ZTLI -ZTLI | ||
--l2stranstest -ZTLl -ZTLl | ||
--l2stranstest -ZTLL -ZTLL | ||
--l2stranstest -ZTLf -ZTLf | ||
--l2stranstest -ZTLd -ZTLd | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --duplicate=difference --duplicate=first --duplicate=low >> $b | ||
gmt $m $l2s --duplicate=mean --duplicate=number --duplicate=rms >> $b | ||
gmt $m $l2s --duplicate=last --duplicate=stddev --duplicate=upper >> $b | ||
gmt $m $l2s --multiple_nodes=sum >> $b | ||
gmt $m $l2s --netcdf+cpt:/some.cpt+dname:sillydata+invalid:-99 >> $b | ||
gmt $m $l2s --netCDF+cpt:-+offset:1+remark:'Smart Grid' >> $b | ||
gmt $m $l2s --ncheader+scale:2+title:"Best Grid Ever"+varname:myvar >> $b | ||
gmt $m $l2s --netcdf+xname:Dr.X+yname:Dr.Y+zname:Dr.Z >> $b | ||
gmt $m $l2s --outgrid=/some/file.grd=nf+divide:2+nan:-99 >> $b | ||
gmt $m $l2s --outgrid=/other/file.grd=nf+offset:6+scale:1.5 >> $b | ||
gmt $m $l2s --increment=5+exact/10 --spacing=2 --inc=1/2+number >> $b | ||
gmt $m $l2s --swap --byteswap >> $b | ||
gmt $m $l2s --onecol=top,left,ascii,noxmax >> $b | ||
gmt $m $l2s --one_col=bottom,right,ascii_float,noymax,byteswap >> $b | ||
gmt $m $l2s --convention=top,right,int8,swap --flags=bottom,left,char >> $b | ||
gmt $m $l2s --onecol=top,left,uint8 --onecol=top,left,uchar >> $b | ||
gmt $m $l2s --onecol=top,left,int16 --onecol=top,left,short >> $b | ||
gmt $m $l2s --onecol=top,left,uint16 --onecol=top,left,ushort >> $b | ||
gmt $m $l2s --onecol=top,left,int32 --onecol=top,left,int >> $b | ||
gmt $m $l2s --onecol=top,left,uint32 --onecol=top,left,uint >> $b | ||
gmt $m $l2s --onecol=top,left,int64 --onecol=top,left,long >> $b | ||
gmt $m $l2s --onecol=top,left,uint64 --onecol=top,left,ulong >> $b | ||
gmt $m $l2s --onecol=top,left,float32 --onecol=top,left,float >> $b | ||
gmt $m $l2s --onecol=top,left,float64 --onecol=top,left,double >> $b | ||
|
||
diff $a $b --strip-trailing-cr > fail |