Running 'aggregate.R' [2s]
  Comparing 'aggregate.Rout' to 'aggregate.Rout.save' ... OK
  Running 'cast.R' [2s]
  Comparing 'cast.Rout' to 'cast.Rout.save' ... OK
  Running 'crs.R' [2s]
  Comparing 'crs.Rout' to 'crs.Rout.save' ... OK
  Running 'dist.R' [2s]
  Comparing 'dist.Rout' to 'dist.Rout.save' ... OK
  Running 'dplyr.R' [8s]
  Comparing 'dplyr.Rout' to 'dplyr.Rout.save' ... OK
  Running 'empty.R' [2s]
  Comparing 'empty.Rout' to 'empty.Rout.save' ... OK
  Running 'gdal_geom.R' [2s]
  Comparing 'gdal_geom.Rout' to 'gdal_geom.Rout.save' ... OK
  Running 'geos.R' [13s]
  Comparing 'geos.Rout' to 'geos.Rout.save' ... OK
  Running 'graticule.R' [5s]
  Comparing 'graticule.Rout' to 'graticule.Rout.save' ... OK
  Running 'grid.R' [2s]
  Comparing 'grid.Rout' to 'grid.Rout.save' ... OK
  Running 'maps.R' [4s]
  Comparing 'maps.Rout' to 'maps.Rout.save' ... OK
  Running 'plot.R' [12s]
  Comparing 'plot.Rout' to 'plot.Rout.save' ... OK
  Running 'read.R' [2s]
  Running 'roundtrip.R' [9s]
  Comparing 'roundtrip.Rout' to 'roundtrip.Rout.save' ...145c145
< Reading layer `nc.gpkg' from data source `D:\temp\RtmpU7tR65\RLIBS_32fec70da443d\sf\gpkg\nc.gpkg' using driver `GPKG'
---
> Reading layer `nc.gpkg' from data source `D:\temp\Rtmp8qxg3B\RLIBS_1b15869f17642\sf\gpkg\nc.gpkg' using driver `GPKG'
  Running 'sample.R' [2s]
  Comparing 'sample.Rout' to 'sample.Rout.save' ... OK
  Running 'sfc.R' [14s]
  Comparing 'sfc.Rout' to 'sfc.Rout.save' ...633c633
< Reading layer `nc' from data source `D:\temp\RtmpU7tR65\RLIBS_32fec70da443d\sf\shape\nc.shp' using driver `ESRI Shapefile'
---
> Reading layer `nc' from data source `D:\temp\Rtmp8qxg3B\RLIBS_1b15869f17642\sf\shape\nc.shp' using driver `ESRI Shapefile'
  Running 'sfg.R' [1s]
  Comparing 'sfg.Rout' to 'sfg.Rout.save' ... OK
  Running 'spatstat.R' [5s]
  Comparing 'spatstat.Rout' to 'spatstat.Rout.save' ...198c198
< Reading layer `nc.gpkg' from data source `D:\temp\RtmpU7tR65\RLIBS_32fec70da443d\sf\gpkg\nc.gpkg' using driver `GPKG'
---
> Reading layer `nc.gpkg' from data source `D:\temp\Rtmp8qxg3B\RLIBS_1b15869f17642\sf\gpkg\nc.gpkg' using driver `GPKG'
  Running 'stars.R' [4s]
  Comparing 'stars.Rout' to 'stars.Rout.save' ...125c125
< Reading layer `nc.gpkg' from data source `D:\temp\RtmpU7tR65\RLIBS_32fec70da443d\sf\gpkg\nc.gpkg' using driver `GPKG'
---
> Reading layer `nc.gpkg' from data source `D:\temp\Rtmp8qxg3B\RLIBS_1b15869f17642\sf\gpkg\nc.gpkg' using driver `GPKG'
  Running 'testthat.R' [1s]
  Comparing 'testthat.Rout' to 'testthat.Rout.save' ... OK
  Running 'units.R' [2s]
  Comparing 'units.Rout' to 'units.Rout.save' ... OK
  Running 'wkb.R' [2s]
  Comparing 'wkb.Rout' to 'wkb.Rout.save' ... OK
Running the tests in 'tests/read.R' failed.
Complete output:
  > Sys.setenv(TZ="UTC")
  > suppressPackageStartupMessages(library(sf))
  > if ("GPKG" %in% st_drivers()$name) {
  + 	tst = st_read(system.file("gpkg/nc.gpkg", package="sf"), "nc.gpkg", crs = 4267, quiet = TRUE)
  + 	tst = st_read(system.file("gpkg/nc.gpkg", package="sf"), quiet = TRUE) # default layer name
  + }
  > 
  > tst = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE) # no layer specified
  > 
  > # data from https://github.com/edzer/sfr/issues/6
  > tst = st_read(system.file("shape/storms_xyz.shp", package="sf"), quiet = TRUE)
  > class(st_geometry(tst))
  [1] "sfc_LINESTRING" "sfc"           
  > class(st_geometry(tst)[[1]])
  [1] "XYZ"        "LINESTRING" "sfg"       
  > tst = st_read(system.file("shape/storms_xyzm.shp", package="sf"), quiet = TRUE)
  > class(st_geometry(tst))
  [1] "sfc_LINESTRING" "sfc"           
  > class(st_geometry(tst)[[1]])
  [1] "XYM"        "LINESTRING" "sfg"       
  > tst = st_read(system.file("shape/storms_xyz_feature.shp", package="sf"), quiet = TRUE)
  > class(st_geometry(tst))
  [1] "sfc_LINESTRING" "sfc"           
  > class(st_geometry(tst)[[1]])
  [1] "XYZ"        "LINESTRING" "sfg"       
  > tst = st_read(system.file("shape/storms_xyzm_feature.shp", package="sf"), quiet = TRUE)
  > class(st_geometry(tst))
  [1] "sfc_LINESTRING" "sfc"           
  > class(st_geometry(tst)[[1]])
  [1] "XYM"        "LINESTRING" "sfg"       
  > 
  > if ("GPKG" %in% st_drivers()$name) { # read Int64
  +     print(st_read(system.file("gpkg/tl.gpkg", package="sf"), quiet = TRUE)$AWATER)
  +     print(st_read(system.file("gpkg/tl.gpkg", package="sf"), quiet = TRUE, int64_as_string = TRUE)$AWATER)
  + }
  [1] 1028678842
  [1] "1028678842"
  > 
  > # see https://github.com/edzer/sfr/issues/45 :
  > if ("OSM" %in% st_drivers()$name && Sys.info()['sysname'] != "Darwin") {
  + 	osm = system.file("osm/overpass.osm", package="sf")
  + 	print(st_layers(osm))
  + 	suppressWarnings(print(st_layers(osm, do_count = TRUE)))
  + 	suppressWarnings(print(st_read(osm, "multipolygons", quiet = TRUE)))
  + }
  Driver: OSM 
  Available layers:
          layer_name       geometry_type features fields
  1           points               Point       NA     10
  2            lines         Line String       NA      9
  3 multilinestrings   Multi Line String       NA      4
  4    multipolygons       Multi Polygon       NA     25
  5  other_relations Geometry Collection       NA      4
  Driver: OSM 
  Available layers:
          layer_name       geometry_type features fields
  1           points               Point        0     10
  2            lines         Line String        0      9
  3 multilinestrings   Multi Line String        0      4
  4    multipolygons       Multi Polygon        3     25
  5  other_relations Geometry Collection        0      4
  Simple feature collection with 3 features and 25 fields
  geometry type:  MULTIPOLYGON
  dimension:      XY
  bbox:           xmin: -1.556254 ymin: 53.79519 xmax: -1.550716 ymax: 53.80341
  CRS:            4326
    osm_id osm_way_id name type aeroway amenity admin_level barrier boundary
  1   <NA>  263958111 <NA> <NA>    <NA>    <NA>        <NA>    <NA>     <NA>
  2   <NA>  301461256 <NA> <NA>    <NA>    <NA>        <NA>    <NA>     <NA>
  3   <NA>  462227487 <NA> <NA>    <NA>    <NA>        <NA>    <NA>     <NA>
    building craft geological historic land_area landuse leisure man_made
  1     <NA>  <NA>       <NA>     <NA>      <NA>    <NA>    park     <NA>
  2     <NA>  <NA>       <NA>     <NA>      <NA>    <NA>    park     <NA>
  3     <NA>  <NA>       <NA>     <NA>      <NA>    <NA>    park     <NA>
    military natural office place shop sport tourism other_tags
  1     <NA>    <NA>   <NA>  <NA> <NA>  <NA>    <NA>       <NA>
  2     <NA>    <NA>   <NA>  <NA> <NA>  <NA>    <NA>       <NA>
  3     <NA>    <NA>   <NA>  <NA> <NA>  <NA>    <NA>       <NA>
                          geometry
  1 MULTIPOLYGON (((-1.550719 5...
  2 MULTIPOLYGON (((-1.555763 5...
  3 MULTIPOLYGON (((-1.551502 5...
  > 
  > # layer opening option:
  > st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE,
  + 	options = c("ADJUST_TYPE=YES", "ENCODING=CPL_ENC_UTF8"))
  Simple feature collection with 100 features and 14 fields
  geometry type:  MULTIPOLYGON
  dimension:      XY
  bbox:           xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
  CRS:            4267
  First 10 features:
      AREA PERIMETER CNTY_ CNTY_ID        NAME  FIPS FIPSNO CRESS_ID BIR74 SID74
  1  0.114     1.442  1825    1825        Ashe 37009  37009        5  1091     1
  2  0.061     1.231  1827    1827   Alleghany 37005  37005        3   487     0
  3  0.143     1.630  1828    1828       Surry 37171  37171       86  3188     5
  4  0.070     2.968  1831    1831   Currituck 37053  37053       27   508     1
  5  0.153     2.206  1832    1832 Northampton 37131  37131       66  1421     9
  6  0.097     1.670  1833    1833    Hertford 37091  37091       46  1452     7
  7  0.062     1.547  1834    1834      Camden 37029  37029       15   286     0
  8  0.091     1.284  1835    1835       Gates 37073  37073       37   420     0
  9  0.118     1.421  1836    1836      Warren 37185  37185       93   968     4
  10 0.124     1.428  1837    1837      Stokes 37169  37169       85  1612     1
     NWBIR74 BIR79 SID79 NWBIR79                       geometry
  1       10  1364     0      19 MULTIPOLYGON (((-81.47276 3...
  2       10   542     3      12 MULTIPOLYGON (((-81.23989 3...
  3      208  3616     6     260 MULTIPOLYGON (((-80.45634 3...
  4      123   830     2     145 MULTIPOLYGON (((-76.00897 3...
  5     1066  1606     3    1197 MULTIPOLYGON (((-77.21767 3...
  6      954  1838     5    1237 MULTIPOLYGON (((-76.74506 3...
  7      115   350     2     139 MULTIPOLYGON (((-76.00897 3...
  8      254   594     2     371 MULTIPOLYGON (((-76.56251 3...
  9      748  1190     2     844 MULTIPOLYGON (((-78.30876 3...
  10     160  2038     5     176 MULTIPOLYGON (((-80.02567 3...
  > 
  > x <- st_sf(a = 1:2, geom = st_sfc(st_point(0:1), st_multipoint(matrix(1:4,2,2))))
  > 
  > try(st_layers("foo")) # cannot open datasource
  Cannot open data source foo
  Error in CPL_get_layers(dsn, options, do_count) : Open failed.
  
  > try(st_read("foo")) # cannot open datasource
  Error : Cannot open "foo"; The file doesn't seem to exist.
  > try(st_read("x.gpkg", "xyz")) # cannot open layer
  Error : Cannot open "x.gpkg"; The file doesn't seem to exist.
  > try(st_write(c("foo", "bar")))
  Error in UseMethod("st_write") : 
    no applicable method for 'st_write' applied to an object of class "character"
  > try(st_write(x, c("foo", "bar")))
  Error in guess_driver(dns) : length(dsn) == 1 is not TRUE
  > try(st_write(x, "foo", driver = "foo"))
  driver `foo' not available.
  Error in CPL_write_ogr(obj, dsn, layer, driver, as.character(dataset_options),  : 
    Driver not available.
  
  > if (Sys.getenv("USER") == "travis") {
  + 	try(st_write(x, "/x", driver = "ESRI Shapefile"))
  + 	st_write(x, "xxx.gpkg")
  + 	st_write(x, "xxx.gpkg", append = TRUE, quiet = FALSE) # appends to layer
  + 	y <- st_sf(b = 1:2, geom = st_sfc(st_point(0:1), st_multipoint(matrix(1:4,2,2))))
  + 	try(st_write(y, "xxx.gpkg"))
  + }
  > 
  > geom = st_sfc(st_point(0:1), st_multipoint(matrix(1:4,2,2)))
  > st_write(geom, "geom.gpkg")
  Writing layer `geom' to data source `geom.gpkg' using driver `GPKG'
  Writing 2 features with 0 fields and geometry type Unknown (any).
  > st_write(geom, "geom1.gpkg", layer = "foo")
  Writing layer `foo' to data source `geom1.gpkg' using driver `GPKG'
  Writing 2 features with 0 fields and geometry type Unknown (any).
  > 
  > df <- data.frame(
  +     a = c(0, 1, NA, -Inf, Inf),
  +     b = c("a", "b", NA, "c", ""),
  +     c = c(as.Date("2001-01-01"), NA, -99, 0, 1),
  +     d = c(as.POSIXct("2001-01-01"), NA, -99, 0, 1),
  +     x = 1:5,
  +     y = 1:5)
  Error in as.Date.numeric(e) : 'origin' must be supplied
  Calls: data.frame ... unlist -> lapply -> FUN -> as.Date -> as.Date.numeric
  Execution halted