1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- #!/bin/sh
- . ./Common
- ###############################################################################
- fped "um: iprint micrometers" <<EOF
- %iprint 100um
- EOF
- expect <<EOF
- 100um
- EOF
- #------------------------------------------------------------------------------
- fped "um: add mm + um" <<EOF
- %iprint 1mm + 100 um
- EOF
- expect <<EOF
- 1.1mm
- EOF
- #------------------------------------------------------------------------------
- fped "um: subtract mil - um" <<EOF
- %iprint 100mil - 100 um
- EOF
- expect <<EOF
- 2.44mm
- EOF
- #------------------------------------------------------------------------------
- fped "um: multiply um with um" <<EOF
- %iprint 100um * 50um
- EOF
- expect <<EOF
- 5000um^2
- EOF
- #------------------------------------------------------------------------------
- fped "um: multiply um with mm" <<EOF
- %iprint 100um * 2mm
- EOF
- expect <<EOF
- 0.2mm^2
- EOF
- #------------------------------------------------------------------------------
- fped "um: divide mil by um" <<EOF
- %iprint 20mil / 10um
- EOF
- expect <<EOF
- 50.8
- EOF
- #------------------------------------------------------------------------------
- fped_dump "um: use um in vector" <<EOF
- vec @(100um, 50um)
- EOF
- expect <<EOF
- /* MACHINE-GENERATED ! */
- package "_"
- unit mm
- __0: vec @(100um, 50um)
- EOF
- #------------------------------------------------------------------------------
- fped "um: measure distance in um" <<EOF
- a: vec @(0mm, 0mm)
- b: vec .(300um, 0mm)
- c: vec .(0mm, 400um)
- meas a >> c /* dummy */
- m: meas a >> c
- %meas m
- EOF
- expect <<EOF
- 0.5
- EOF
|