test(codly-languages): add typst-test tests

This commit is contained in:
swaits committed 2024-11-30 21:14:19 +01:00
1 parent 25c0a86364
commit 25793820c5
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

@@ -1,4 +1,4 @@
#import "lib.typ": *
#import "/lib.typ": *
#let base-languages = (
"aarch64",
@@ -95,6 +95,9 @@
}
}
Found all base languages!
#let aliases = (
"arm",
"bash",
@@ -148,6 +151,10 @@
}
}
Found all language aliases!
#if codly-languages.keys().len() != base-languages.len() + aliases.len() {
panic("error: language count is incorrect")
}
Language key count matches: #codly-languages.keys().len() keys.