" Tests for various functions. func Test_str2nr() call assert_equal(0, str2nr('')) call assert_equal(1, str2nr('1')) call assert_equal(1, str2nr(' 1 ')) call assert_equal(1, str2nr('+1')) call assert_equal(1, str2nr('+ 1')) call assert_equal(1, str2nr(' + 1 ')) call assert_equal(-1, str2nr('-1')) call assert_equal(-1, str2nr('- 1')) call assert_equal(-1, str2nr(' - 1 ')) call assert_equal(123456789, str2nr('123456789')) call assert_equal(-123456789, str2nr('-123456789')) endfunc