Unified · Split
| @@ -1,4 +1,4 @@ | |||
| 1 | use std::convert::TryInto; | 1 | use std::convert::{TryFrom, TryInto}; |
| 2 | 2 | ||
| 3 | use git_ref::packed; | 3 | use git_ref::packed; |
| 4 | use git_testtools::fixture_path; | 4 | use git_testtools::fixture_path; |
| @@ -8,16 +8,13 @@ use crate::{ · 3 unmodified lines | |||
| 8 | packed::write_packed_refs_with, | 8 | packed::write_packed_refs_with, |
| 9 | }; | 9 | }; |
| 10 | 10 | ||
| 11 | // TODO: figure this out | 11 | #[test] |
| 12 | // #[test] | 12 | fn a_lock_file_would_not_be_a_valid_partial_name() { |
| 13 | // fn a_lock_file_would_not_be_a_valid_partial_name() { | 13 | // doesn't really belong here but want to make sure refname validation works as expected. |
| 14 | // // doesn't really belong here but want to make sure refname validation works as expected. | 14 | // let err: &git_ref::PartialNameRef = "heads/hello.lock".try_into().expect_err("this should fail"); |
| 15 | // let err: &PartialNameRef = "heads/hello.lock".try_into().expect_err("this should fail"); | 15 | let err = <&git_ref::PartialNameRef as TryFrom<_>>::try_from("heads/hello.lock").expect_err("this should fail"); |
| 16 | // assert_eq!( | 16 | assert_eq!(err.to_string(), "A reference must be a valid tag name as well"); |
| 17 | // err.as_bstr().to_string(), | 17 | } |
| 18 | // "A reference must be a valid tag name as well" | ||
| 19 | // ); | ||
| 20 | // } | ||
| 21 | 18 | ||
| 22 | #[test] | 19 | #[test] |
| 23 | fn all_iterable_refs_can_be_found() -> crate::Result { | 20 | fn all_iterable_refs_can_be_found() -> crate::Result { |