Skip to content

Commit

Permalink
Complete project_name updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rockerBOO authored and lpil committed Dec 10, 2024
1 parent 798ac36 commit 475debf
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: "compile(config, modules)"
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>app · · v0.1.0</title>
<title>app · test_project_name · v0.1.0</title>
<meta name="description" content=""/>
<meta name="theme-color" content="#ffaff3" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#33384d" media="(prefers-color-scheme: dark)"/>
Expand All @@ -18,7 +18,7 @@ expression: "compile(config, modules)"
between multiple versions of the same package. -->
<script src="./docs_config.js"></script>
<link id="syntax-theme" rel="stylesheet" href="./css/atom-one-light.min.css?v=GLEAM_VERSION_HERE"/>

<link rel="canonical" href="https://hexdocs.pm/test_project_name/app.html" />
</head>
<body class="prewrap-off theme-light drawer-closed">
<script>
Expand Down Expand Up @@ -149,7 +149,7 @@ expression: "compile(config, modules)"
</button>
<h2>
<a href="./"></a>
<a href="./">test_project_name</a>
<span id="project-version">
<span> - v0.1.0 </span>
</span>
Expand Down Expand Up @@ -187,7 +187,7 @@ expression: "compile(config, modules)"
</h2>
<div class="search">
<div class="search-input-wrap">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search " autocomplete="off">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search test_project_name" autocomplete="off">
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#icon-svg-search"></use></svg></label>
</div>
<div id="search-results" class="search-results"></div>
Expand All @@ -211,7 +211,7 @@ expression: "compile(config, modules)"
<h2>Links</h2>
<ul>
<li><a href="https://hex.pm/packages/">Hex</a></li>
<li><a href="https://hex.pm/packages/test_project_name">Hex</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: "compile(config, modules)"
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>app · · v0.1.0</title>
<title>app · test_project_name · v0.1.0</title>
<meta name="description" content=""/>
<meta name="theme-color" content="#ffaff3" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#33384d" media="(prefers-color-scheme: dark)"/>
Expand All @@ -18,7 +18,7 @@ expression: "compile(config, modules)"
between multiple versions of the same package. -->
<script src="./docs_config.js"></script>
<link id="syntax-theme" rel="stylesheet" href="./css/atom-one-light.min.css?v=GLEAM_VERSION_HERE"/>

<link rel="canonical" href="https://hexdocs.pm/test_project_name/app.html" />
</head>
<body class="prewrap-off theme-light drawer-closed">
<script>
Expand Down Expand Up @@ -149,7 +149,7 @@ expression: "compile(config, modules)"
</button>
<h2>
<a href="./"></a>
<a href="./">test_project_name</a>
<span id="project-version">
<span> - v0.1.0 </span>
</span>
Expand Down Expand Up @@ -187,7 +187,7 @@ expression: "compile(config, modules)"
</h2>
<div class="search">
<div class="search-input-wrap">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search " autocomplete="off">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search test_project_name" autocomplete="off">
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#icon-svg-search"></use></svg></label>
</div>
<div id="search-results" class="search-results"></div>
Expand All @@ -211,7 +211,7 @@ expression: "compile(config, modules)"
<h2>Links</h2>
<ul>
<li><a href="https://hex.pm/packages/">Hex</a></li>
<li><a href="https://hex.pm/packages/test_project_name">Hex</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: "compile(config, modules)"
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>app · · v0.1.0</title>
<title>app · test_project_name · v0.1.0</title>
<meta name="description" content=""/>
<meta name="theme-color" content="#ffaff3" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#33384d" media="(prefers-color-scheme: dark)"/>
Expand All @@ -18,7 +18,7 @@ expression: "compile(config, modules)"
between multiple versions of the same package. -->
<script src="./docs_config.js"></script>
<link id="syntax-theme" rel="stylesheet" href="./css/atom-one-light.min.css?v=GLEAM_VERSION_HERE"/>

<link rel="canonical" href="https://hexdocs.pm/test_project_name/app.html" />
</head>
<body class="prewrap-off theme-light drawer-closed">
<script>
Expand Down Expand Up @@ -149,7 +149,7 @@ expression: "compile(config, modules)"
</button>
<h2>
<a href="./"></a>
<a href="./">test_project_name</a>
<span id="project-version">
<span> - v0.1.0 </span>
</span>
Expand Down Expand Up @@ -187,7 +187,7 @@ expression: "compile(config, modules)"
</h2>
<div class="search">
<div class="search-input-wrap">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search " autocomplete="off">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search test_project_name" autocomplete="off">
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#icon-svg-search"></use></svg></label>
</div>
<div id="search-results" class="search-results"></div>
Expand All @@ -211,7 +211,7 @@ expression: "compile(config, modules)"
<h2>Links</h2>
<ul>
<li><a href="https://hex.pm/packages/">Hex</a></li>
<li><a href="https://hex.pm/packages/test_project_name">Hex</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: "compile(config, modules)"
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>app · · v0.1.0</title>
<title>app · test_project_name · v0.1.0</title>
<meta name="description" content=""/>
<meta name="theme-color" content="#ffaff3" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#33384d" media="(prefers-color-scheme: dark)"/>
Expand All @@ -18,7 +18,7 @@ expression: "compile(config, modules)"
between multiple versions of the same package. -->
<script src="./docs_config.js"></script>
<link id="syntax-theme" rel="stylesheet" href="./css/atom-one-light.min.css?v=GLEAM_VERSION_HERE"/>

<link rel="canonical" href="https://hexdocs.pm/test_project_name/app.html" />
</head>
<body class="prewrap-off theme-light drawer-closed">
<script>
Expand Down Expand Up @@ -149,7 +149,7 @@ expression: "compile(config, modules)"
</button>
<h2>
<a href="./"></a>
<a href="./">test_project_name</a>
<span id="project-version">
<span> - v0.1.0 </span>
</span>
Expand Down Expand Up @@ -187,7 +187,7 @@ expression: "compile(config, modules)"
</h2>
<div class="search">
<div class="search-input-wrap">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search " autocomplete="off">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search test_project_name" autocomplete="off">
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#icon-svg-search"></use></svg></label>
</div>
<div id="search-results" class="search-results"></div>
Expand All @@ -211,7 +211,7 @@ expression: "compile(config, modules)"
<h2>Links</h2>
<ul>
<li><a href="https://hex.pm/packages/">Hex</a></li>
<li><a href="https://hex.pm/packages/test_project_name">Hex</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: "compile(config, modules)"
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>app · · v0.1.0</title>
<title>app · test_project_name · v0.1.0</title>
<meta name="description" content=""/>
<meta name="theme-color" content="#ffaff3" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#33384d" media="(prefers-color-scheme: dark)"/>
Expand All @@ -18,7 +18,7 @@ expression: "compile(config, modules)"
between multiple versions of the same package. -->
<script src="./docs_config.js"></script>
<link id="syntax-theme" rel="stylesheet" href="./css/atom-one-light.min.css?v=GLEAM_VERSION_HERE"/>

<link rel="canonical" href="https://hexdocs.pm/test_project_name/app.html" />
</head>
<body class="prewrap-off theme-light drawer-closed">
<script>
Expand Down Expand Up @@ -149,7 +149,7 @@ expression: "compile(config, modules)"
</button>
<h2>
<a href="./"></a>
<a href="./">test_project_name</a>
<span id="project-version">
<span> - v0.1.0 </span>
</span>
Expand Down Expand Up @@ -187,7 +187,7 @@ expression: "compile(config, modules)"
</h2>
<div class="search">
<div class="search-input-wrap">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search " autocomplete="off">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search test_project_name" autocomplete="off">
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#icon-svg-search"></use></svg></label>
</div>
<div id="search-results" class="search-results"></div>
Expand All @@ -211,7 +211,7 @@ expression: "compile(config, modules)"
<h2>Links</h2>
<ul>
<li><a href="https://hex.pm/packages/">Hex</a></li>
<li><a href="https://hex.pm/packages/test_project_name">Hex</a></li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expression: "compile(config, modules)"
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>app · · v0.1.0</title>
<title>app · test_project_name · v0.1.0</title>
<meta name="description" content=""/>
<meta name="theme-color" content="#ffaff3" media="(prefers-color-scheme: light)"/>
<meta name="theme-color" content="#33384d" media="(prefers-color-scheme: dark)"/>
Expand All @@ -18,7 +18,7 @@ expression: "compile(config, modules)"
between multiple versions of the same package. -->
<script src="./docs_config.js"></script>
<link id="syntax-theme" rel="stylesheet" href="./css/atom-one-light.min.css?v=GLEAM_VERSION_HERE"/>

<link rel="canonical" href="https://hexdocs.pm/test_project_name/app.html" />
</head>
<body class="prewrap-off theme-light drawer-closed">
<script>
Expand Down Expand Up @@ -149,7 +149,7 @@ expression: "compile(config, modules)"
</button>
<h2>
<a href="./"></a>
<a href="./">test_project_name</a>
<span id="project-version">
<span> - v0.1.0 </span>
</span>
Expand Down Expand Up @@ -187,7 +187,7 @@ expression: "compile(config, modules)"
</h2>
<div class="search">
<div class="search-input-wrap">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search " autocomplete="off">
<input type="text" id="search-input" class="search-input" tabindex="0" aria-label="Search test_project_name" autocomplete="off">
<label for="search-input" class="search-label"><svg viewBox="0 0 24 24" class="search-icon"><use xlink:href="#icon-svg-search"></use></svg></label>
</div>
<div id="search-results" class="search-results"></div>
Expand All @@ -211,7 +211,7 @@ expression: "compile(config, modules)"
<h2>Links</h2>
<ul>
<li><a href="https://hex.pm/packages/">Hex</a></li>
<li><a href="https://hex.pm/packages/test_project_name">Hex</a></li>
</ul>
Expand Down
25 changes: 17 additions & 8 deletions compiler-core/src/docs/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ pub fn compile(config: PackageConfig, modules: Vec<(&str, &str)>) -> EcoString {

#[test]
fn hello_docs() {
let config = PackageConfig::default();
let mut config = PackageConfig::default();
config.name = EcoString::from("test_project_name");
let modules = vec![(
"app.gleam",
r#"
Expand All @@ -139,7 +140,8 @@ pub fn one() {
// https://github.com/gleam-lang/gleam/issues/2347
#[test]
fn tables() {
let config = PackageConfig::default();
let mut config = PackageConfig::default();
config.name = EcoString::from("test_project_name");
let modules = vec![(
"app.gleam",
r#"
Expand All @@ -159,7 +161,8 @@ pub fn one() {
// https://github.com/gleam-lang/gleam/issues/2202
#[test]
fn long_function_wrapping() {
let config = PackageConfig::default();
let mut config = PackageConfig::default();
config.name = EcoString::from("test_project_name");
let modules = vec![(
"app.gleam",
r#"
Expand All @@ -185,7 +188,8 @@ pub fn lazy_or(first: Option(a), second: fn() -> Option(a)) -> Option(a) {

#[test]
fn internal_definitions_are_not_included() {
let config = PackageConfig::default();
let mut config = PackageConfig::default();
config.name = EcoString::from("test_project_name");
let modules = vec![(
"app.gleam",
r#"
Expand All @@ -208,7 +212,8 @@ pub fn one() { 1 }
// https://github.com/gleam-lang/gleam/issues/2561
#[test]
fn discarded_arguments_are_not_shown() {
let config = PackageConfig::default();
let mut config = PackageConfig::default();
config.name = EcoString::from("test_project_name");
let modules = vec![("app.gleam", "pub fn discard(_discarded: a) -> Int { 1 }")];
insta::assert_snapshot!(compile(config, modules));
}
Expand Down Expand Up @@ -258,7 +263,8 @@ pub fn indentation_test() {

#[test]
fn markdown_code_from_function_comment_is_trimmed() {
let config = PackageConfig::default();
let mut config = PackageConfig::default();
config.name = EcoString::from("test_project_name");
let modules = vec![(
"app.gleam",
"
Expand Down Expand Up @@ -296,7 +302,8 @@ fn markdown_code_from_module_comment_is_trimmed() {

#[test]
fn doc_for_commented_definitions_is_not_included_in_next_constant() {
let config = PackageConfig::default();
let mut config = PackageConfig::default();
config.name = EcoString::from("test_project_name");
let modules = vec![(
"app.gleam",
"
Expand Down Expand Up @@ -332,7 +339,8 @@ pub type Wibble {

#[test]
fn doc_for_commented_definitions_is_not_included_in_next_function() {
let config = PackageConfig::default();
let mut config = PackageConfig::default();
config.name = EcoString::from("test_project_name");
let modules = vec![(
"app.gleam",
"
Expand Down Expand Up @@ -366,6 +374,7 @@ pub type Wibble = Int
#[test]
fn source_link_for_github_repository() {
let mut config = PackageConfig::default();
config.name = EcoString::from("test_project_name");
config.repository = Repository::GitHub {
user: "wibble".to_string(),
repo: "wobble".to_string(),
Expand Down

0 comments on commit 475debf

Please sign in to comment.