# UTF-8 tests that can't be run on Windows CRAN
# R CMD check will try to parse the file anyway,
# we use a different file extension to avoid this.
df <- data.frame(中文1 = 1:10, 中文2 = 1:10, eng = 1:10)
df2 <- df |> mutate(中文1 = 中文1 + 1)
gdf2 <- df |> group_by(eng) |> mutate(中文1 = 中文1 + 1)

expect_equal(lobstr::obj_addrs(names(df)), lobstr::obj_addrs(names(df2)))
expect_equal(lobstr::obj_addrs(names(df)), lobstr::obj_addrs(names(gdf2)))

df3 <- filter(df2, eng > 5)
gdf3 <- filter(gdf2, eng > 5)
expect_equal(lobstr::obj_addrs(names(df)), lobstr::obj_addrs(names(df3)))
expect_equal(lobstr::obj_addrs(names(df)), lobstr::obj_addrs(names(gdf3)))

df4 <- filter(df2, 中文1 > 5)
gdf4 <- filter(gdf2, 中文1 > 5)
expect_equal(lobstr::obj_addrs(names(df)), lobstr::obj_addrs(names(df4)))
expect_equal(lobstr::obj_addrs(names(df)), lobstr::obj_addrs(names(gdf4)))
