test(codly-languages): add typst-test tests
This commit is contained in:
4 files changed
+79
-1
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 254 KiB |
@@ -0,0 +1,71 @@
|
|||||||
|
#import "/lib.typ": *
|
||||||
|
#import "@preview/codly:1.0.0": *
|
||||||
|
#show: codly-init
|
||||||
|
#codly(languages: codly-languages)
|
||||||
|
|
||||||
|
```python
|
||||||
|
print("Hello, World!")
|
||||||
|
```
|
||||||
|
|
||||||
|
```java
|
||||||
|
public class HelloWorld {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println("Hello, World!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```js
|
||||||
|
console.log("Hello, World!");
|
||||||
|
```
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
std::cout << "Hello, World!" << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```rust
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, World!");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```cs
|
||||||
|
using System;
|
||||||
|
|
||||||
|
class Program {
|
||||||
|
static void Main() {
|
||||||
|
Console.WriteLine("Hello, World!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println("Hello, World!")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```swift
|
||||||
|
print("Hello, World!")
|
||||||
|
```
|
||||||
|
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
echo "Hello, World!";
|
||||||
|
?>
|
||||||
|
```
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
fun main() {
|
||||||
|
println("Hello, World!")
|
||||||
|
}
|
||||||
|
```
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
+8
-1
@@ -1,4 +1,4 @@
|
|||||||
#import "lib.typ": *
|
#import "/lib.typ": *
|
||||||
|
|
||||||
#let base-languages = (
|
#let base-languages = (
|
||||||
"aarch64",
|
"aarch64",
|
||||||
@@ -95,6 +95,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Found all base languages!
|
||||||
|
|
||||||
|
|
||||||
#let aliases = (
|
#let aliases = (
|
||||||
"arm",
|
"arm",
|
||||||
"bash",
|
"bash",
|
||||||
@@ -148,6 +151,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Found all language aliases!
|
||||||
|
|
||||||
#if codly-languages.keys().len() != base-languages.len() + aliases.len() {
|
#if codly-languages.keys().len() != base-languages.len() + aliases.len() {
|
||||||
panic("error: language count is incorrect")
|
panic("error: language count is incorrect")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Language key count matches: #codly-languages.keys().len() keys.
|
||||||
Reference in new issue
Block a user