|
| 1 | +# @data_provider data_increment_patch |
| 2 | +function test_increment_patch() { |
| 3 | + ver=$(bin/version increment $1); |
| 4 | + assert_equals $ver $2; |
| 5 | +} |
| 6 | + |
| 7 | +# @data_provider data_increment_minor |
| 8 | +function test_increment_minor() { |
| 9 | + ver=$(bin/version increment $1 --part minor); |
| 10 | + assert_equals $ver $2; |
| 11 | +} |
| 12 | + |
| 13 | +# @data_provider data_increment_major |
| 14 | +function test_increment_major() { |
| 15 | + ver=$(bin/version increment $1 --part major); |
| 16 | + assert_equals $ver $2; |
| 17 | +} |
| 18 | + |
| 19 | +# @data_provider data_increment_with_pre_release |
| 20 | +function test_increment_with_pre_release() { |
| 21 | + ver=$(bin/version increment $1 --pre alpha); |
| 22 | + assert_equals $ver $2; |
| 23 | +} |
| 24 | + |
| 25 | +# @data_provider data_increment_with_build |
| 26 | +function test_increment_with_build() { |
| 27 | + ver=$(bin/version increment $1 --build 123); |
| 28 | + assert_equals $ver $2; |
| 29 | +} |
| 30 | + |
| 31 | +# @data_provider data_increment_with_pre_release_and_build |
| 32 | +function test_increment_with_pre_release_and_build() { |
| 33 | + ver=$(bin/version increment $1 --build 123 --pre alpha); |
| 34 | + assert_equals $ver $2; |
| 35 | +} |
| 36 | + |
| 37 | +function data_increment_patch() { |
| 38 | + echo "0.0.0" "0.0.1"; |
| 39 | + echo "1.0.0" "1.0.1"; |
| 40 | +} |
| 41 | + |
| 42 | +function data_increment_minor() { |
| 43 | + echo "0.0.0" "0.1.0"; |
| 44 | + echo "1.0.0" "1.1.0"; |
| 45 | +} |
| 46 | + |
| 47 | +function data_increment_major() { |
| 48 | + echo "0.0.0" "1.0.0"; |
| 49 | + echo "1.0.0" "2.0.0"; |
| 50 | +} |
| 51 | + |
| 52 | +function data_increment_with_pre_release() { |
| 53 | + echo "0.0.0" "0.0.1-alpha"; |
| 54 | + echo "1.0.0" "1.0.1-alpha"; |
| 55 | +} |
| 56 | + |
| 57 | +function data_increment_with_pre_release_and_build() { |
| 58 | + echo "0.0.0" "0.0.1-alpha+123"; |
| 59 | + echo "1.0.0" "1.0.1-alpha+123"; |
| 60 | +} |
0 commit comments