10046 mktemp should support templates not located at the end of templates

Review Request #2202 — Created July 27, 2019 and updated — Latest diff uploaded

bertford
illumos-gate
general

10046 mktemp should support templates not located at the end of templates

I've tested the new functionality of the mktemp command which includes a -s flag allowing a suffix to be passed. In addition, I've regression tested all existing functionality.

bob@omniosce:/tmp/tmp.DDaGIR$ mktemp
/tmp/tmp.rNaWKR
bob@omniosce:/tmp/tmp.DDaGIR$ mktemp -d
/tmp/tmp.yZa4KR
bob@omniosce:/tmp/tmp.DDaGIR$ mktemp -s .txt
/tmp/tmp.AUaiLR.txt
bob@omniosce:/tmp/tmp.DDaGIR$ mktemp -s .txt -d
/tmp/tmp.LwayLR.txt
bob@omniosce:/tmp/tmp.DDaGIR$ mktemp -s .txt XXXXXX
_daOLR.txt
bob@omniosce:/tmp/tmp.DDaGIR$ mktemp -s .txt -d XXXXXX
yDaWLR.txt
bob@omniosce:/tmp/tmp.DDaGIR$ mktemp XXXXXXX.txt
XE1aaMR.txt
bob@omniosce:/tmp/tmp.DDaGIR$ ls -l XE1aaMR.txt
-rw------- 1 bob other 0 Jul 27 00:05 XE1aaMR.txt
bob@omniosce:/tmp/tmp.DDaGIR$ mktemp -d XXXXXX.txt
48aqMR.txt
bob@omniosce:/tmp/tmp.DDaGIR$ ls -ld 48aqMR.txt/
drwx------ 2 bob other 117 Jul 27 00:05 48aqMR.txt/

Loading...