⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arith.t

📁 一个开放源代码的 AT&T 的 Korn Shell 的复制品, 支持大多数 ksh89 的特性。
💻 T
字号:
name: arith-lazy-1description:	Check that only one side of ternary operator is evaluatedstdin:	x=i+=2	y=j+=2	typeset -i i=1 j=1	echo $((1 ? 20 : (x+=2)))	echo $i,$x	echo $((0 ? (y+=2) : 30))	echo $j,$yexpected-stdout:	20	1,i+=2	30	1,j+=2---name: arith-lazy-2description:	Check that assignments not done on non-evaluated side of ternary	operatorstdin:	x=i+=2	y=j+=2	typeset -i i=1 j=1	echo $((1 ? 20 : (x+=2)))	echo $i,$x	echo $((0 ? (y+=2) : 30))	echo $i,$yexpected-stdout:	20	1,i+=2	30	1,j+=2---name: arith-ternary-prec-1description:	Check precidance of ternary operator vs assignmentstdin:	typeset -i x=2	y=$((1 ? 20 : x+=2))expected-exit: e != 0expected-stderr-pattern:	/.*:.*1 \? 20 : x\+=2.*lvalue.*\n$/---name: arith-ternary-prec-2description:	Check precidance of ternary operator vs assignmentstdin:	typeset -i x=2	echo $((0 ? x+=2 : 20))expected-stdout:	20---name: arith-div-assoc-1description:	Check associativity of division operatorstdin:	echo $((20 / 2 / 2))expected-stdout:	5---name: arith-assop-assoc-1description:	Check associativity of assignment-operator operatorstdin:	typeset -i i=1 j=2 k=3	echo $((i += j += k))	echo $i,$j,$kexpected-stdout:	6	6,5,3---

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -