[test] fix multiple extra options (#5158)

diff --git a/script/test b/script/test
index 63d3600..9aea568 100755
--- a/script/test
+++ b/script/test
@@ -337,8 +337,11 @@
         export -n VERBOSE
     fi
 
-    read -r -a ot_extra_options_in <<<"${OT_OPTIONS-}"
-    ot_extra_options=${ot_extra_options_in:-()}
+    if [[ ${OT_OPTIONS+x} ]]; then
+        read -r -a ot_extra_options <<<"${OT_OPTIONS}"
+    else
+        ot_extra_options=()
+    fi
 }
 
 main()