package vcaml
OCaml bindings for the Neovim API
Install
Dune Dependency
Authors
Maintainers
Sources
vcaml-v0.16.0.tar.gz
sha256=dd123302c46af7ca6eda8a7806c78236fd217a8c73a2e1cd7da85f1d69ed1ae4
doc/src/vcaml.semantics_test/test_error_reporting.ml.html
Source file test_error_reporting.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
(* The tests in this file demonstrate VCaml's own guarantees about how it behaves. *) open Core open Async open Vcaml open Vcaml_test_helpers let%expect_test "Error in the middle of an atomic call is returned correctly" = Backtrace.elide := true; let%bind () = Expect_test_helpers_async.require_does_raise_async [%here] (fun () -> with_client (fun client -> let open Deferred.Or_error.Let_syntax in let get name = Nvim.get_var name ~type_:Boolean in let set name value = Nvim.set_var name ~type_:Boolean ~value in let%map foo, bar, baz = run_join [%here] client (let open Api_call.Or_error.Let_syntax in let%map () = set "foo" true and () = set "baz" true and foo = get "foo" and bar = get "bar" and baz = get "baz" in foo, bar, baz) in print_s [%message "" (foo : bool) (bar : bool) (baz : bool)])) in [%expect {| (("Called from" lib/vcaml/test/semantics/test_error_reporting.ml:LINE:COL) (("Vim returned error" "Key not found: bar" (error_type Validation)) (index 3))) |}]; Backtrace.elide := false; return () ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>