-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
12 changed files
with
445 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,52 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test grd2xyz longopts translation. | ||
|
||
m=grd2xyz | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -C/some/file.cpt -C/some/file.cpt | ||
--l2stranstest -Ff -Ff -Fi | ||
--l2stranstest -Lc -Lc | ||
--l2stranstest -Lr -Lx -Ly | ||
--l2stranstest -Ta5 -Ta -Tb0.8 | ||
--l2stranstest -Wa+uin -W2 | ||
--l2stranstest -ZTLax | ||
--l2stranstest -ZBRay | ||
--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 --cpt=/some/file.cpt --cmap=/some/file.cpt >> $b | ||
gmt $m $l2s --rowcol=one --row_col=fortran --rowcol=indexz >> $b | ||
gmt $m $l2s --single=col --hvline=column >> $b | ||
gmt $m $l2s --array=row --single=x --single=y >> $b | ||
gmt $m $l2s --stl=ascii:5 --stl=ASCII --stl=binary:0.8 >> $b | ||
gmt $m $l2s --weight=area+unit:in --weight=2 >> $b | ||
gmt $m $l2s --onecol=top,left,ascii,noxmax >> $b | ||
gmt $m $l2s --one_col=bottom,right,ASCII,noymax >> $b | ||
gmt $m $l2s --ordering=top,right,int8,swap --onecol=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 |
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 grdconvert longopts translation. | ||
|
||
m=grdconvert | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -Cb -Cc | ||
--l2stranstest -Cn -Cp | ||
--l2stranstest -G/some/file.grd=nf+d2+n-99 | ||
--l2stranstest -G/other/file.grd=nf+o6+s1.5 | ||
--l2stranstest -N | ||
--l2stranstest -Z+o3 -Z+s2 | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --cmdhist=both --command_history=current >> $b | ||
gmt $m $l2s --cmdhist=none --command_history=previous >> $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 --no_header >> $b | ||
gmt $m $l2s --modify+offset:3 --scale+scale:2 >> $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,38 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test grdlandmask longopts translation. | ||
|
||
m=grdlandmask | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -A1000/2/4+ag+l | ||
--l2stranstest -A100+ai+p75 | ||
--l2stranstest -A75+r | ||
--l2stranstest -Df+f -Dh | ||
--l2stranstest -Di -Dl | ||
--l2stranstest -Dc -Da | ||
--l2stranstest -E1/2/3/4 -E6 | ||
--l2stranstest -G/some/file.grd=nf+d2+n-99 | ||
--l2stranstest -G/other/file.grd=nf+o6+s1.5 | ||
--l2stranstest -I5+e/10+n | ||
--l2stranstest -N1/0/1/0/1 | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --min_area=1000/2/4+antarctica:g+regular_lakes >> $b | ||
gmt $m $l2s --area=100+antarctica:i+min_polygon:75 >> $b | ||
gmt $m $l2s --area_thresh=75+river_lakes >> $b | ||
gmt $m $l2s --resolution=full+lower --resolution=high >> $b | ||
gmt $m $l2s --resolution=intermediate --resolution=low >> $b | ||
gmt $m $l2s --resolution=crude --resolution=auto >> $b | ||
gmt $m $l2s --bordervalues=1/2/3/4 --border=6 >> $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+number >> $b | ||
gmt $m $l2s --maskvalues=1/0/1/0/1 >> $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,44 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test grdvector longopts translation. | ||
|
||
m=grdvector | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -A | ||
--l2stranstest -C/some/file.cpt -C/some/file.cpt | ||
--l2stranstest -Gblue | ||
--l2stranstest -I20/30 -Ix3/4 -I4/5 | ||
--l2stranstest -N | ||
--l2stranstest -Q+a20+bA+c -Q+c+e+gred | ||
--l2stranstest -Q+h1.5+je -Q+mfc+n3/1 | ||
--l2stranstest -Q+o0/89+p2p -Q+q+s+t1/2 | ||
--l2stranstest -Q+vi7 -Q+z2 | ||
--l2stranstest -Si0.8+c10/20 | ||
--l2stranstest -Sl6+s2 | ||
--l2stranstest -T | ||
--l2stranstest -W2p,red+c | ||
--l2stranstest -Z | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --polar >> $b | ||
gmt $m $l2s --cpt=/some/file.cpt --cmap=/some/file.cpt >> $b | ||
gmt $m $l2s --fill=blue >> $b | ||
gmt $m $l2s --increment=20/30 --inc=multiples:3/4 --spacing=4/5 >> $b | ||
gmt $m $l2s --noclip >> $b | ||
gmt $m $l2s --vector+apex:20+begin:A+cpt --vector+cmap+end+fill:red >> $b | ||
gmt $m $l2s --vector+shape:1.5+justify:e --vector+midpoint:fc+norm:3/1 >> $b | ||
gmt $m $l2s --vector+oblique:0/89+pen:2p --vector+angles+xycoords+trim:1/2 >> $b | ||
gmt $m $l2s --vector+polar_scale:i7 --vector+polar_convert:2 >> $b | ||
gmt $m $l2s --vec_scale=invert:0.8+location:10/20 >> $b | ||
gmt $m $l2s --vec_scale=length:6+size:2 >> $b | ||
gmt $m $l2s --sign_scale >> $b | ||
gmt $m $l2s --pen=2p,red+color >> $b | ||
gmt $m $l2s --azimuth >> $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,34 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test grdview longopts translation. | ||
|
||
m=grdview | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -C/some/file.cpt -C/some/file.cpt | ||
--l2stranstest -G/this/file.grd -G/that/file.grd | ||
--l2stranstest -I/lighting/file+a | ||
--l2stranstest -I+d -I6+m6+nsome.args | ||
--l2stranstest -N200+ggreen | ||
--l2stranstest -Qm+m -Qmx+m | ||
--l2stranstest -S | ||
--l2stranstest -T+o2p,black+s | ||
--l2stranstest -Wc -Wm -Wf | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --cpt=/some/file.cpt --cmap=/some/file.cpt >> $b | ||
gmt $m $l2s --drapegrid=/this/file.grd --drape=/that/file.grd >> $b | ||
gmt $m $l2s --illumination=/lighting/file+azimuth >> $b | ||
gmt $m $l2s --shading+default --intensity=6+ambient:6+args:some.args >> $b | ||
gmt $m $l2s --plane=200+color:green >> $b | ||
gmt $m $l2s --plottype=m+monochrome --surftype=mx+mono >> $b | ||
gmt $m $l2s --smooth >> $b | ||
gmt $m $l2s --no_interp+outlines:2p,black+skipnans >> $b | ||
gmt $m $l2s --pen=contour --pen=mesh --pen=facade >> $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 grdvolume longopts translation. | ||
|
||
m=grdvolume | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -C25 -Cr1000/5000 | ||
--l2stranstest -D | ||
--l2stranstest -L100 -L200 | ||
--l2stranstest -Se | ||
--l2stranstest -Tc -Th | ||
--l2stranstest -Z20/1.5 | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --contour=25 --contour=range:1000/5000 >> $b | ||
gmt $m $l2s --slice >> $b | ||
gmt $m $l2s --base=100 --base_level=200 >> $b | ||
gmt $m $l2s --unit=e >> $b | ||
gmt $m $l2s --maximize=curvature --maximize=height >> $b | ||
gmt $m $l2s --scale=20/1.5 >> $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,37 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test inset longopts translation. | ||
|
||
m=inset | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -Cw25 | ||
--l2stranstest -D10/20/2/3+r+ui | ||
--l2stranstest -Dg1/-0.5+w7 | ||
--l2stranstest -DjBR+jLT | ||
--l2stranstest -DJBR+o1/2 | ||
--l2stranstest -Dn0/0 -Dx5/5 | ||
--l2stranstest -F+c10+gred+i4p/black | ||
--l2stranstest -F+p2p+r1p+s1/2/gray | ||
--l2stranstest -N -N | ||
EOF | ||
|
||
# module-specific longopts | ||
# (note 'gmt {begin,end}' bracketing as module not available in classic mode) | ||
gmt begin | ||
gmt $m $l2s --clearance=w25 >> $b | ||
gmt $m $l2s --rectangle=10/20/2/3+corners+units:i >> $b | ||
gmt $m $l2s --inset_box=mapcoords:1/-0.5+width:7 >> $b | ||
gmt $m $l2s --position=inside:BR+janchor:LT >> $b | ||
gmt $m $l2s --rectangle=outside:BR+anchoroffset:1/2 >> $b | ||
gmt $m $l2s --rectangle=boxcoords:0/0 --rectangle=plotcoords:5/5 >> $b | ||
gmt $m $l2s --inset_frame+clearance:10+fill:red+inner:4p/black >> $b | ||
gmt $m $l2s --box+pen:2p+radius:1p+shade:1/2/gray >> $b | ||
gmt $m $l2s --noclip --no_clip >> $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,22 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test kml2gmt longopts translation. | ||
|
||
m=kml2gmt | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -E -E | ||
--l2stranstest -Fs -Fl -Fp | ||
--l2stranstest -Z | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --z_ignore --extend_data >> $b | ||
gmt $m $l2s --feature=point --feature_type=line --feature=polygon >> $b | ||
gmt $m $l2s --altitudes >> $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,54 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test makecpt longopts translation. | ||
|
||
m=makecpt | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -A50+a | ||
--l2stranstest -C/some/file.cpt -C/some/file.cpt | ||
--l2stranstest -Di -Do | ||
--l2stranstest -E4 | ||
--l2stranstest -Fc -Fg -Fh+kD | ||
--l2stranstest -Fr+cmylbl -FR -Fx | ||
--l2stranstest -G5/10 | ||
--l2stranstest -H | ||
--l2stranstest -Icz | ||
--l2stranstest -M -M | ||
--l2stranstest -N | ||
--l2stranstest -Q | ||
--l2stranstest -Sa -Sm -Sp | ||
--l2stranstest -Sp -Sq -Sr | ||
--l2stranstest -S20+d | ||
--l2stranstest -T0/10/1+b -T20/30/5+l | ||
--l2stranstest -T300/1000/100+i -T0/10/1+n | ||
--l2stranstest -Ww | ||
--l2stranstest -Z | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --alpha=50+all >> $b | ||
gmt $m $l2s --cpt=/some/file.cpt --cmap=/some/file.cpt >> $b | ||
gmt $m $l2s --bg=in --background=out >> $b | ||
gmt $m $l2s --nlevels=4 >> $b | ||
gmt $m $l2s --format=cmyk --color_model=gray --format=hsv+key:D >> $b | ||
gmt $m $l2s --format=rgb+categorical:mylbl --format=name --format=hex >> $b | ||
gmt $m $l2s --truncate=5/10 >> $b | ||
gmt $m $l2s --savecpt >> $b | ||
gmt $m $l2s --reverse=colors,zvalues >> $b | ||
gmt $m $l2s --overrule --overrule_bg >> $b | ||
gmt $m $l2s --no_bg >> $b | ||
gmt $m $l2s --log >> $b | ||
gmt $m $l2s --range_mode=average --auto=median --range_mode=lms >> $b | ||
gmt $m $l2s --range_mode=mode --range_mode=quartiles --range_mode=minmax >> $b | ||
gmt $m $l2s --range_mode=20+discrete >> $b | ||
gmt $m $l2s --steps=0/10/1+log2 --series=20/30/5+log10 >> $b | ||
gmt $m $l2s --range=300/1000/100+inverse --steps=0/10/1+number >> $b | ||
gmt $m $l2s --categorical=wrap >> $b | ||
gmt $m $l2s --continuous >> $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,32 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Test nearneighbor longopts translation. | ||
|
||
m=nearneighbor | ||
l2s='--l2stranstest' | ||
a=$m-l2s-a.txt | ||
b=$m-l2s-b.txt | ||
rm -f $a $b ; touch $b | ||
|
||
cat << EOF > $a | ||
--l2stranstest -E | ||
--l2stranstest -G/somefile=nf+d10+n-999+o6 | ||
--l2stranstest -G/otherfile+oa | ||
--l2stranstest -G/otherfile+s100 | ||
--l2stranstest -I3m+e/100+n -I1/2 -I2+e | ||
--l2stranstest -N12+m4 -Nn -N4+m2 | ||
--l2stranstest -S25 | ||
--l2stranstest -W | ||
EOF | ||
|
||
# module-specific longopts | ||
gmt $m $l2s --empty >> $b | ||
gmt $m $l2s --outgrid=/somefile=nf+divide:10+nan:-999+offset:6 >> $b | ||
gmt $m $l2s --outgrid=/otherfile+offset:a >> $b | ||
gmt $m $l2s --outgrid=/otherfile+scale:100 >> $b | ||
gmt $m $l2s --increment=3m+exact/100+number --inc=1/2 --spacing=2+exact >> $b | ||
gmt $m $l2s --sectors=12+min:4 --nearest=gdal --sectors=4+min_sectors:2 >> $b | ||
gmt $m $l2s --search_radius=25 >> $b | ||
gmt $m $l2s --weights >> $b | ||
|
||
diff $a $b --strip-trailing-cr > fail |
Oops, something went wrong.