diff --git a/.github/workflows/rust-compile.yml b/.github/workflows/rust-compile.yml index 2fd1be708..9837c2ae8 100644 --- a/.github/workflows/rust-compile.yml +++ b/.github/workflows/rust-compile.yml @@ -150,3 +150,8 @@ jobs: --target ${{ matrix.target }} ${{ steps.build-options.outputs.CARGO_BUILD_OPTIONS}} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}} + + - name: Run doctests + if: ${{ !matrix.skip-tests }} + run: > + cargo test --doc diff --git a/crates/rattler_conda_types/src/match_spec/mod.rs b/crates/rattler_conda_types/src/match_spec/mod.rs index 5ccc9c573..95f4c2d0b 100644 --- a/crates/rattler_conda_types/src/match_spec/mod.rs +++ b/crates/rattler_conda_types/src/match_spec/mod.rs @@ -89,13 +89,13 @@ use matcher::StringMatcher; /// assert_eq!(spec.version, Some(VersionSpec::from_str("1.0.*", Strict).unwrap())); /// assert_eq!(spec.channel, Some(Channel::from_str("conda-forge", &channel_config).map(|channel| Arc::new(channel)).unwrap())); /// -/// let spec = MatchSpec::from_str("conda-forge/linux-64::foo>=1.0", Strict).unwrap(); +/// let spec = MatchSpec::from_str("conda-forge/linux-64::foo >=1.0", Strict).unwrap(); /// assert_eq!(spec.name, Some(PackageName::new_unchecked("foo"))); /// assert_eq!(spec.version, Some(VersionSpec::from_str(">=1.0", Strict).unwrap())); /// assert_eq!(spec.channel, Some(Channel::from_str("conda-forge", &channel_config).map(|channel| Arc::new(channel)).unwrap())); /// assert_eq!(spec.subdir, Some("linux-64".to_string())); /// -/// let spec = MatchSpec::from_str("*/linux-64::foo>=1.0", Strict).unwrap(); +/// let spec = MatchSpec::from_str("*/linux-64::foo >=1.0", Strict).unwrap(); /// assert_eq!(spec.name, Some(PackageName::new_unchecked("foo"))); /// assert_eq!(spec.version, Some(VersionSpec::from_str(">=1.0", Strict).unwrap())); /// assert_eq!(spec.channel, Some(Channel::from_str("*", &channel_config).map(|channel| Arc::new(channel)).unwrap()));