After a successful build, the tests fail; here is part of the spec
Requires: libicu%icu_ver
%description
An editor that pays homage to the classic MS-DOS Editor, but with a modern interface and input controls similar to VS Code.
%prep
%setup -a1
%patch -p1
cat >.cargo/config <<EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
%build
export EDIT_CFG_ICUUC_SONAME=libicuuc.so.%icu_ver
export EDIT_CFG_ICUI18N_SONAME=libicui18n.so.%icu_ver
export EDIT_CFG_ICU_RENAMING_VERSION=%icu_ver
%rust_build
%install
install -Dm 755 target/release/edit -t %buildroot%_bindir
%check
%rust_test
%files
%_bindir/edit
%doc LICENSE
For icu_ver 7.6, Rust version 1.95 and 1.2.0 build without issues, but 2.0.0 does not. The problem might be that I removed RUSTC_BOOTSTRAP=1, and the tests require nightly features. Here is the test error itself
Finished release profile [optimized + debuginfo] target(s) in 16.90s
[00:00:27] Running unittests src/lib.rs (target/release/deps/edit-537b5e8384b30508)
[00:00:27]
[00:00:27] running 43 tests
[00:00:27] test icu::tests::init ... ignored
[00:00:27] test base64::tests::test_basic ... ok
[00:00:27] test buffer::navigation::test::test_word_navigation ... ok
[00:00:27] test icu::tests::test_compare_strings_ascii ... ok
[00:00:27] test json::tests::test_bool ... ok
[00:00:27] test buffer::tests::replace_all_zero_width ... FAILED
[00:00:27] test buffer::tests::replace_one_zero_width ... FAILED
[00:00:27] test json::tests::test_control_chars ... ok
[00:00:27] test json::tests::test_max_depth ... ok
[00:00:27] test json::tests::test_array ... ok
[00:00:27] test json::tests::test_comments ... ok
[00:00:27] test json::tests::test_nested ... ok
[00:00:27] test json::tests::test_null ... ok
[00:00:27] test json::tests::test_number ... ok
[00:00:27] test json::tests::test_invalid_json ... ok
[00:00:27] test json::tests::test_object ... ok
[00:00:27] test json::tests::test_trailing_comma ... ok
[00:00:27] test json::tests::test_string ... ok
[00:00:27] test json::tests::test_unicode ... ok
[00:00:27] test oklab::tests::test_blending ... ok
[00:00:27] test path::tests::test_unix ... ok
[00:00:27] test simd::lines_bwd::test::seeks_to_start ... ok
[00:00:27] test simd::memchr2::tests::test_basic ... ok
[00:00:27] test simd::memchr2::tests::test_empty ... ok
[00:00:27] test simd::memchr2::tests::test_with_offset ... ok
[00:00:27] test unicode::measurement::test::test_any_wrap ... ok
[00:00:27] test simd::memchr2::tests::test_page_boundary ... ok
[00:00:27] test unicode::measurement::test::test_any_wrap_wide ... ok
[00:00:27] test unicode::measurement::test::test_crlf ... ok
[00:00:27] test simd::lines_fwd::test::pseudo_fuzz ... ok
[00:00:27] test unicode::measurement::test::test_exact_wrap ... ok
[00:00:27] test unicode::measurement::test::test_force_wrap ... ok
[00:00:27] test unicode::measurement::test::test_force_wrap_column ... ok
[00:00:27] test unicode::measurement::test::test_force_wrap_wide ... ok
[00:00:27] test unicode::measurement::test::test_measure_forward_chunk_boundaries ... ok
[00:00:27] test unicode::measurement::test::test_measure_forward_clipped_wide_char ... ok
[00:00:27] test unicode::measurement::test::test_measure_forward_newline_start ... ok
[00:00:27] test unicode::measurement::test::test_measure_forward_tabs ... ok
[00:00:27] test unicode::measurement::test::test_measure_forward_word_wrap ... ok
[00:00:27] test unicode::measurement::test::test_strip_newline ... ok
[00:00:27] test unicode::measurement::test::test_wrap_tab ... ok
[00:00:27] test unicode::measurement::test::test_wrapped_cursor_can_seek_backward ... ok
[00:00:27] test simd::lines_bwd::test::pseudo_fuzz ... ok
[00:00:27]
[00:00:27] failures:
[00:00:27]
[00:00:27] ---- buffer::tests::replace_all_zero_width stdout ----
[00:00:27]
[00:00:27] thread 'buffer::tests::replace_all_zero_width' (88153) panicked at crates/edit/src/buffer/mod.rs:3178:10:
[00:00:27] called Result::unwrap() on an Err value: Error(0)
[00:00:27]
[00:00:27] ---- buffer::tests::replace_one_zero_width stdout ----
[00:00:27]
[00:00:27] thread 'buffer::tests::replace_one_zero_width' (88154) panicked at crates/edit/src/buffer/mod.rs:3160:14:
[00:00:27] called Result::unwrap() on an Err value: Error(0)
[00:00:27] note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
[00:00:27]
[00:00:27]
[00:00:27] failures:
[00:00:27] buffer::tests::replace_all_zero_width
[00:00:27] buffer::tests::replace_one_zero_width
[00:00:27]
[00:00:27] test result: FAILED. 40 passed; 2 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
[00:00:27]
[00:00:27] error: test failed, to rerun pass --lib
[00:00:27] Running unittests src/bin/edit/main.rs (target/release/deps/edit-17c0b67aa99d6b88)
[00:00:27]
[00:00:27] running 1 test
[00:00:27] test documents::tests::test_parse_last_numbers ... ok
[00:00:27]
[00:00:27] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
[00:00:27]
[00:00:27] Doc-tests edit
[00:00:28]
[00:00:28] running 2 tests
[00:00:28] test crates/edit/src/tui.rs - tui::Context<'a,'_>::styled_label_begin (line 1963) ... ok
[00:00:28] test crates/edit/src/tui.rs - tui (line 91) ... ok
[00:00:28]
[00:00:28] test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
[00:00:28]
[00:00:28] all doctests ran in 1.66s; merged doctests compilation took 1.66s
[00:00:28] error: 1 target failed:
[00:00:28] --lib
[00:00:28] error: Bad exit status from /usr/src/tmp/rpm-tmp.24248 (%check)
[00:00:28]
[00:00:28]
[00:00:28] RPM build errors:
[00:00:28] Bad exit status from /usr/src/tmp/rpm-tmp.24248 (%check)
[00:00:28] Command exited with non-zero status
After a successful build, the tests fail; here is part of the spec
For icu_ver 7.6, Rust version 1.95 and 1.2.0 build without issues, but 2.0.0 does not. The problem might be that I removed RUSTC_BOOTSTRAP=1, and the tests require nightly features. Here is the test error itself