text: // Generated by ReScript, PLEASE EDIT WITH CARE
  'use strict';
  
  var Curry = require("bs-platform/lib/js/curry.js");
  var Vscode = require("vscode");
  var $$Promise = require("reason-promise/lib/js/src/js/promise.bs.js");
  var Mocha$BsMocha = require("bs-mocha/lib/js/src/Mocha.bs.js");
  var Assert$BsMocha = require("bs-mocha/lib/js/src/Assert.bs.js");
  var Common$AgdaModeVscode = require("../../../src/Common.bs.js");
  
  function openEditorWithContent(content) {
    return $$Promise.flatMap(Vscode.workspace.openTextDocument({
                    content: content,
                    language: "agda"
                  }), (function (textDocument) {
                  return Vscode.window.showTextDocument(textDocument, undefined);
                }));
  }
  
  Mocha$BsMocha.describe("Conversion of offsets between LF and CRLF line endings")(undefined, undefined, undefined, (function (param) {
          Mocha$BsMocha.describe("Editor.computeCRLFIndices")(undefined, undefined, undefined, (function (param) {
                  return Mocha$BsMocha.it("should work")(undefined, undefined, undefined, (function (param) {
                                Assert$BsMocha.deep_equal(undefined, Curry._1(Common$AgdaModeVscode.Agda.OffsetConverter.computeCRLFIndices, "1234\r\n78"), [4]);
                                return Assert$BsMocha.deep_equal(undefined, Curry._1(Common$AgdaModeVscode.Agda.OffsetConverter.computeCRLFIndices, "12\r\n56\r\n90"), [
                                            2,
                                            6
                                          ]);
                              }));
                }));
          Mocha$BsMocha.describe("Editor.Indices.make")(undefined, undefined, undefined, (function (param) {
                  return Mocha$BsMocha.it("should work")(undefined, undefined, undefined, (function (param) {
                                return Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.expose(Common$AgdaModeVscode.Indices.make(Curry._1(Common$AgdaModeVscode.Agda.OffsetConverter.computeCRLFIndices, "12\r\n56\r\n90")))[0], [
                                            [
                                              0,
                                              2
                                            ],
                                            [
                                              3,
                                              5
                                            ]
                                          ]);
                              }));
                }));
          return Mocha$BsMocha.describe("Editor.Indices.convert")(undefined, undefined, undefined, (function (param) {
                        return Mocha$BsMocha.it("should work")(undefined, undefined, undefined, (function (param) {
                                      var a = Common$AgdaModeVscode.Indices.make(Curry._1(Common$AgdaModeVscode.Agda.OffsetConverter.computeCRLFIndices, "12\r\n56\r\n90"));
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.convert(a, 0), 0);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.expose(a)[1], 0);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.convert(a, 1), 1);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.expose(a)[1], 0);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.convert(a, 2), 2);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.expose(a)[1], 0);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.convert(a, 3), 4);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.expose(a)[1], 1);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.convert(a, 4), 5);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.expose(a)[1], 1);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.convert(a, 5), 6);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.expose(a)[1], 1);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.convert(a, 6), 8);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.expose(a)[1], 2);
                                      Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.convert(a, 7), 9);
                                      return Assert$BsMocha.deep_equal(undefined, Common$AgdaModeVscode.Indices.expose(a)[1], 2);
                                    }));
                      }));
        }));
  
  var Assert;
  
  var P;
  
  exports.Assert = Assert;
  exports.P = P;
  exports.openEditorWithContent = openEditorWithContent;
  /*  Not a pure module */
  