@@ -24,7 +24,7 @@ function mock_date_seconds() {
2424
2525function test_now_with_perl() {
2626 mock clock::shell_time mock_non_existing_fn
27- mock perl echo " 1720705883457"
27+ mock perl <<< " 1720705883457"
2828 mock dependencies::has_python mock_false
2929 mock dependencies::has_node mock_false
3030
@@ -35,7 +35,7 @@ function test_now_on_linux_unknown() {
3535 mock_unknown_linux_os
3636 mock clock::shell_time mock_non_existing_fn
3737 mock perl mock_non_existing_fn
38- mock date echo " 1720705883457"
38+ mock date <<< " 1720705883457"
3939 mock dependencies::has_python mock_false
4040 mock dependencies::has_node mock_false
4141
@@ -45,7 +45,7 @@ function test_now_on_linux_unknown() {
4545function test_now_on_linux_alpine() {
4646 mock_alpine_os
4747 mock clock::shell_time mock_non_existing_fn
48- mock perl echo " 1720705883457"
48+ mock perl <<< " 1720705883457"
4949 mock dependencies::has_python mock_false
5050 mock dependencies::has_node mock_false
5151
@@ -56,7 +56,7 @@ function test_now_on_windows_without_with_powershell() {
5656 mock_windows_os
5757 mock dependencies::has_perl mock_false
5858 mock dependencies::has_powershell mock_true
59- mock powershell echo " 1727768183281580800"
59+ mock powershell <<< " 1727768183281580800"
6060 mock clock::shell_time mock_non_existing_fn
6161 mock dependencies::has_python mock_false
6262 mock dependencies::has_node mock_false
@@ -68,7 +68,7 @@ function test_now_on_windows_without_without_powershell() {
6868 mock_windows_os
6969 mock dependencies::has_perl mock_false
7070 mock dependencies::has_powershell mock_false
71- mock date echo " 1727768951"
71+ mock date <<< " 1727768951"
7272 mock clock::shell_time mock_non_existing_fn
7373 mock dependencies::has_python mock_false
7474 mock dependencies::has_node mock_false
@@ -94,24 +94,24 @@ function test_now_on_osx_without_perl() {
9494
9595 mock_macos
9696 mock dependencies::has_perl mock_false
97- mock clock::shell_time echo " 1727708708.326957"
97+ mock clock::shell_time <<< " 1727708708.326957"
9898 mock dependencies::has_python mock_false
9999 mock dependencies::has_node mock_false
100100
101101 assert_same " 1727708708326957000" " $( clock::now) "
102102}
103103
104104function test_runtime_in_milliseconds_when_not_empty_time() {
105- mock perl echo " 1720705883457"
105+ mock perl <<< " 1720705883457"
106106 mock dependencies::has_python mock_false
107107 mock dependencies::has_node mock_false
108108
109109 assert_not_empty " $( clock::total_runtime_in_milliseconds) "
110110}
111111
112112function test_now_prefers_perl_over_shell_time() {
113- mock clock::shell_time echo " 1234.0"
114- mock perl echo " 999999999999"
113+ mock clock::shell_time <<< " 1234.0"
114+ mock perl <<< " 999999999999"
115115 mock dependencies::has_python mock_false
116116 mock dependencies::has_node mock_false
117117
@@ -121,9 +121,9 @@ function test_now_prefers_perl_over_shell_time() {
121121function test_now_prefers_python_over_node() {
122122 mock perl mock_non_existing_fn
123123 mock dependencies::has_python mock_true
124- mock python echo " 777777777777"
124+ mock python <<< " 777777777777"
125125 mock dependencies::has_node mock_true
126- mock node echo " 888888888888"
126+ mock node <<< " 888888888888"
127127
128128 assert_same " 777777777777" " $( clock::now) "
129129}
0 commit comments