nix-helpers: cb8d207069c3341cba267d0369871cbd2a887f34

     1: {
     2:   asPath,
     3:   hello,
     4:   nothing,
     5: }:
     6: 
     7: with builtins;
     8: with import ./util.nix { };
     9: assert
    10:   typeOf rootPath == "path"
    11:   || die {
    12:     error = "rootPath should be a path";
    13:     actualType = typeOf rootPath;
    14:   };
    15: assert
    16:   toString rootPath == "/"
    17:   || die {
    18:     error = "rootPath should be /";
    19:     rootPath = toString rootPath;
    20:   };
    21: assert
    22:   typeOf (asPath ./.) == "path"
    23:   || die {
    24:     error = "asPath of a path should produce a path";
    25:     actualType = typeOf (asPath ./.);
    26:   };
    27: assert
    28:   toString (asPath ./.) == toString ./.
    29:   || die {
    30:     error = "asPath result didn't match input";
    31:     input = toString ./.;
    32:     output = toString (asPath ./.);
    33:   };
    34: assert
    35:   typeOf (asPath "${hello}/bin/hello") == "path"
    36:   || die {
    37:     error = "asPath couldn't handle store paths";
    38:     actualType = typeOf (asPath "${hello}/bin/hello");
    39:   };
    40: nothing

Generated by git2html.