Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

Updated tests : Expect single-line anchors and correct URLs - Updated and added tests.

+21 -4
+21 -4
compiler-core/src/docs/tests.rs
··· 26 26 use camino::Utf8PathBuf; 27 27 use ecow::EcoString; 28 28 use hexpm::version::Version; 29 + use http::Uri; 29 30 use itertools::Itertools; 30 31 use serde_json::to_string as serde_to_string; 31 32 ··· 626 627 let modules = vec![("app.gleam", "pub type Wibble = Int")]; 627 628 assert!( 628 629 compile(config, modules) 629 - .contains("https://github.com/wibble/wobble/blob/v0.1.0/src/app.gleam#L1-L1") 630 + .contains("https://github.com/wibble/wobble/blob/v0.1.0/src/app.gleam#L1") 630 631 ); 631 632 } 632 633 ··· 641 642 }; 642 643 643 644 let modules = vec![("app.gleam", "pub type Wibble = Int")]; 644 - assert!(compile(config, modules).contains( 645 - "https://github.com/wibble/wobble/blob/v0.1.0/path/to/package/src/app.gleam#L1-L1" 646 - )); 645 + assert!( 646 + compile(config, modules).contains( 647 + "https://github.com/wibble/wobble/blob/v0.1.0/path/to/package/src/app.gleam#L1" 648 + ) 649 + ); 647 650 } 648 651 649 652 #[test] ··· 1162 1165 NONE 1163 1166 ); 1164 1167 } 1168 + #[test] 1169 + fn gitea_repository_url_has_no_double_slash() { 1170 + let repo = Repository::Gitea { 1171 + host: "https://code.example.org/".parse::<Uri>().unwrap(), 1172 + user: "person".into(), 1173 + repo: "forgejo_bug".into(), 1174 + path: None, 1175 + }; 1176 + 1177 + assert_eq!( 1178 + repo.url().unwrap(), 1179 + "https://code.example.org/person/forgejo_bug" 1180 + ); 1181 + }