Login
7 branches 0 tags
Ben (Win10) Added some string tests 7bdccf7 3 years ago 765 Commits
nujel / testsuite / standalone.nuj
; Nujel - Copyright (C) 2020-2021 - Benjamin Vincent Schulenburg
; This project uses the MIT license, a copy should be included under /LICENSE

[when [and [not= System/Architecture 'wasm]
           [not= System/OS 'DOS]
           [resolves? 'popen]]
  [test/add #t [file/dir? "stdlib"]]
  [test/add #f [file/file? "stdlib"]]
  [test/add #t [file/file? "GNUmakefile"]]
  [test/add #f [file/dir? "GNUmakefile"]]
  [test/add #f [ref [file/stat "GNUmakefile"] :error?]]
  [test/add #t [ref [file/stat "This-file-should-never-exist.jpeg"] :error?]]
  [test/add #t [> [ref [file/stat "GNUmakefile"] :size] 1024]]
  [test/add #t [int? [ref [file/stat "GNUmakefile"] :modification-time]]]
  [test/add #t [int? [ref [file/stat "GNUmakefile"] :access-time]]]
  [test/add #t [int? [ref [file/stat "GNUmakefile"] :mode]]]
  [test/add #t [boolean? [ref [file/stat "GNUmakefile"] :regular-file?]]]
  [test/add #t [boolean? [ref [file/stat "GNUmakefile"] :directory?]]]
  [test/add #t [boolean? [ref [file/stat "GNUmakefile"] :character-device?]]]
  [test/add #t [boolean? [ref [file/stat "GNUmakefile"] :block-device?]]]
  [test/add #t [boolean? [ref [file/stat "GNUmakefile"] :named-pipe?]]]]

[test/add #t [tree? System/Environment]]
[test/add #t [string? [ref System/Environment 'PATH]]]