Compare commits

..

No commits in common. "dabe0a2ef57682f1eae5e27c60cbf68a366fc54a" and "093ed09293a191b57c016ce562bab004d408f75c" have entirely different histories.

8 changed files with 87 additions and 96 deletions

0
generate-theme.sh Executable file → Normal file
View File

View File

@ -26,17 +26,8 @@ function enter-section() {
eval "$2" eval "$2"
exit_status=$? exit_status=$?
if ! [ $exit_status -eq $3 ]; then
if [ "$3" == "should fail" ]; then abort "command: $2 failed in section: $1"
log "INFO" "expected to fail..."
if [ $exit_status -eq 0 ]; then
abort "command: $2 failed in section: $1 with: $exit_status"
fi
else
log "INFO" "expected to pass..."
if [ ! $exit_status -eq 0 ]; then
abort "command: $2 failed in section: $1 with: $exit_status"
fi
fi fi
printf "\\n" printf "\\n"
@ -45,10 +36,10 @@ function enter-section() {
enter-section "Typstyle checking" "./run-fmt.sh --check src/lib.typ" 0 enter-section "Typstyle checking" "./run-fmt.sh --check src/lib.typ" 0
enter-section "BUILD: ABB code theme" "./generate-theme.sh" 0 enter-section "BUILD: ABB code theme" "./generate-theme.sh" 0
enter-section "Compiling template..." "typst compile template/main.typ --root . example.pdf" enter-section "Compiling template..." "typst compile template/main.typ --root . example.pdf" 0
enter-section "TEST: local template import" "typst compile tests/local-import/main.typ --root ." enter-section "TEST: local template import" "typst compile tests/local-import/main.typ --root ." 0
enter-section "TEST: invalid config case 1" "typst compile tests/invalid-config/test-case-1.typ --root ." "should fail" enter-section "TEST: invalid config case 1" "typst compile tests/invalid-config/test-case-1.typ --root ." 1
enter-section "TEST: invalid config case 2" "typst compile tests/invalid-config/test-case-2.typ --root ." enter-section "TEST: invalid config case 2" "compile tests/invalid-config/test-case-2.typ" 0
enter-section "TEST: invalid config case 3" "typst compile tests/invalid-config/test-case-3.typ --root ." "should fail" enter-section "TEST: invalid config case 3" "typst compile tests/invalid-config/test-case-3.typ --root ." 1
log "INFO" "CI completed successfully" log "INFO" "CI completed successfully"

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/sh
function format() { function format() {
# format file # format file

View File

@ -1,5 +1,5 @@
let let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable"; nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
pkgs = import nixpkgs { config = {}; overlays = []; }; pkgs = import nixpkgs { config = {}; overlays = []; };
in in

View File

@ -1,7 +1,8 @@
#import "../../src/lib.typ": dhbw-template #import "../../src/lib.typ": dhbw-template
#show: dhbw-template.with(( #show: dhbw-template.with(
config: (
lang: none, lang: none,
region: "en", region: "en",
author: ( author: (

View File

@ -1,32 +1,30 @@
#import "../../src/lib.typ": dhbw-template #import "../../src/lib.typ": dhbw-template
#show: dhbw-template.with(( #show: dhbw-template.with(
lang: "en", config: (
this-key-is-not-in-config: "Ha Ha", lang: "en",
region: "en", this-key-is-not-in-config: "Ha Ha",
author: ( region: "en",
name: "Sven Vogel", author: (
semester: 4, name: "Sven Vogel",
program: "Informationtechnology", semester: 4,
course: "TINF19IT1", program: "Informationtechnology",
faculty: "Technik", course: "TINF19IT1",
university: "DHBW Mannheim", faculty: "Technik",
company: "ABB AG", university: "DHBW Mannheim",
supervisor: "Benny Goodman", company: "ABB AG",
matriculation-number: 123456789, supervisor: "Benny Goodman",
), matriculation-number: 123456789),
thesis: ( thesis: (
title: "Unofficial ABB/DHBW Typst template", title: "Unofficial ABB/DHBW Typst template",
subtitle: "for reports and thesises", subtitle: "for reports and thesises",
submission-date: "23rd march 2020", submission-date: "23rd march 2020",
timeframe: "1st january 2020 - 20th march 2020", timeframe: "1st january 2020 - 20th march 2020",
kind: "T2000", kind: "T2000",
summary: none, summary: none,
abstract: none, abstract: none,
keywords: ("IT", "other stuff"), keywords: ( "IT", "other stuff" ),
bibliography: none, bibliography: none,
glossary: none, glossary: none,
appendices: none, appendices: none)))
),
))

View File

@ -1,26 +1,24 @@
#import "../../src/lib.typ": dhbw-template #import "../../src/lib.typ": dhbw-template
#show: dhbw-template.with(( #show: dhbw-template.with(
lang: "en", config: (
region: "en", lang: "en",
author: ( region: "en",
university: "DHBW Mannheim", author: (
company: "ABB AG", university: "DHBW Mannheim",
supervisor: none, company: "ABB AG",
matriculation-number: 123456789, supervisor: none,
), matriculation-number: 123456789),
thesis: ( thesis: (
title: "Unofficial ABB/DHBW Typst template", title: "Unofficial ABB/DHBW Typst template",
subtitle: "for reports and thesises", subtitle: "for reports and thesises",
submission-date: "23rd march 2020", submission-date: "23rd march 2020",
timeframe: "1st january 2020 - 20th march 2020", timeframe: "1st january 2020 - 20th march 2020",
kind: "T2000", kind: "T2000",
summary: none, summary: none,
abstract: none, abstract: none,
keywords: ("IT", "other stuff"), keywords: ( "IT", "other stuff" ),
bibliography: none, bibliography: none,
glossary: none, glossary: none,
appendices: none, appendices: none)))
),
))

View File

@ -1,26 +1,29 @@
#import "../../src/lib.typ": dhbw-template #import "../../src/lib.typ": dhbw-template
#show: dhbw-template.with(( #show: dhbw-template.with(
lang: "en", config: (
region: "en", lang: "en",
author: ( region: "en",
university: "DHBW Mannheim", author: (
company: "ABB AG", name: "Sven Vogel",
supervisor: "Vivaldi", semester: 4,
matriculation-number: 123456789, program: "Informationtechnology",
), course: "TINF19IT1",
thesis: ( faculty: "Technik",
title: "Unofficial ABB/DHBW Typst template", university: "DHBW Mannheim",
subtitle: "for reports and thesises", company: "ABB AG",
submission-date: "23rd march 2020", supervisor: "Benny Goodman",
timeframe: "1st january 2020 - 20th march 2020", matriculation-number: 123456789),
kind: "T2000", thesis: (
summary: none, title: "Unofficial ABB/DHBW Typst template",
abstract: none, subtitle: "for reports and thesises",
keywords: ("IT", "other stuff"), submission-date: "23rd march 2020",
bibliography: none, timeframe: "1st january 2020 - 20th march 2020",
glossary: none, kind: "T2000",
appendices: none, summary: none,
), abstract: none,
)) keywords: ( "IT", "other stuff" ),
bibliography: none,
glossary: none,
appendices: none)))