Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fc1943s committed May 14, 2024
1 parent 6ae21df commit 97f8114
Show file tree
Hide file tree
Showing 9 changed files with 30,208 additions and 22,549 deletions.
20 changes: 20 additions & 0 deletions apps/documents/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apps/documents/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ regex = "~1.10"
clap = "~4.5"
chrono = "~0.4"
async-std = "~1.12"
encoding_rs = "~0.8"
encoding_rs_io = "~0.1"
futures = "~0.3"
futures-lite = "~2.3"
async-walkdir = "~1.0"
Expand Down
2 changes: 1 addition & 1 deletion apps/documents/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $ErrorActionPreference = "Stop"
$projectName = "documents"

if (!$fast -and !$SkipNotebook) {
{ . apps/spiral/dist/Supervisor$(_exe) --execute-command "pwsh -c `"scripts/invoke-dib.ps1 ../vault/apps/$projectName/$projectName.dib`"" } | Invoke-Block -Retries 5 -Location ../../../polyglot
{ . apps/spiral/dist/Supervisor$(_exe) --execute-command "target/release/spiral_builder$(_exe) dib --path ../vault/apps/$projectName/$projectName.dib" } | Invoke-Block -Retries 3 -Location ../../../polyglot
}

{ . ../../../polyglot/apps/parser/dist/DibParser$(_exe) "$projectName.dib" spi } | Invoke-Block
Expand Down
11 changes: 4 additions & 7 deletions apps/documents/documents.dib
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,10 @@ let get_command () =
#!spiral

let crowbook { ext dist_dir dist_path output_path } =
inl command = $'$"crowbook --single \\\"{!dist_path}\\\" --output \\\"{!output_path}\\\" --to {!ext} --set rendering.num_depth 6 html.css.add \\\\\\"\' body {{ color: #e8e6e3; background-color: #202324; }} a {{ color: #989693; }} \'\\\\\\""'

inl exit_code, result =
runtime.execution_options fun x => { x with
command
command = $'$"crowbook --single \\\"{!dist_path}\\\" --output \\\"{!output_path}\\\" --to {!ext} --set rendering.num_depth 6 html.css.add \\\\\\"\' body {{ color: #e8e6e3; background-color: #202324; }} a {{ color: #989693; }} \'\\\\\\""'
working_directory = dist_dir |> Some |> optionm'.box
}
|> runtime.execute_with_options
Expand Down Expand Up @@ -416,7 +415,7 @@ let run { source_dir dist_dir cache_dir hangul_spec }
(new_pair file files |> Ok |> resultm.box) : _ _ sm'.std_string
|> async.par_collect

trace Debug
trace Info
fun () => $'"documents.run"'
fun () =>
inl result_len = result |> am'.vec_len
Expand All @@ -429,7 +428,7 @@ let run { source_dir dist_dir cache_dir hangul_spec }

//// test
//// print_code=false
///! rust -d async-walkdir futures-lite rayon regex sha2
///! rust -d async-walkdir encoding_rs encoding_rs_io futures-lite rayon regex sha2

types ()
inl workspace_root = file_system.get_workspace_root ()
Expand Down Expand Up @@ -584,9 +583,7 @@ inl tests () =
///!

inl main (args : array_base string) =
inl trace_state = get_trace_state ()
inl trace_level = trace_state.level
trace_level <- Info
Info |> Some |> init_trace_state

trace Info
fun () => $'$"documents.main"'
Expand Down
Loading

0 comments on commit 97f8114

Please sign in to comment.