summaryrefslogtreecommitdiff
path: root/release/src/router/busybox/shell/ash_test/ash-read/read_ifs.tests
diff options
context:
space:
mode:
Diffstat (limited to 'release/src/router/busybox/shell/ash_test/ash-read/read_ifs.tests')
-rwxr-xr-xrelease/src/router/busybox/shell/ash_test/ash-read/read_ifs.tests7
1 files changed, 7 insertions, 0 deletions
diff --git a/release/src/router/busybox/shell/ash_test/ash-read/read_ifs.tests b/release/src/router/busybox/shell/ash_test/ash-read/read_ifs.tests
new file mode 100755
index 00000000..cf7cd934
--- /dev/null
+++ b/release/src/router/busybox/shell/ash_test/ash-read/read_ifs.tests
@@ -0,0 +1,7 @@
+printf 'a\t\tb\tc\n' | ( IFS=$(printf "\t") read a b c; echo ".$a. .$b. .$c." )
+printf 'a\t\tb\tc\n' | ( IFS=$(printf " \t") read a b c; echo ".$a. .$b. .$c." )
+printf 'a,,b,c\n' | ( IFS="," read a b c; echo ".$a. .$b. .$c." )
+printf 'a,,b,c\n' | ( IFS=" ," read a b c; echo ".$a. .$b. .$c." )
+printf 'a ,, c\n' | ( IFS=" ," read a b c; echo ".$a. .$b. .$c." )
+printf 'a ,, c d\n' | ( IFS=" ," read a b c d; echo ".$a. .$b. .$c. .$d." )
+printf ' a,,b,c,d , ,\n' | ( IFS=" ," read a b c; echo ".$a. .$b. .$c." )