New Upstream Snapshot - r-cran-selectr

Ready changes

Summary

Merged new upstream version: 0.4-2+git20221113.1.f344d5c (was: 0.4-2).

Resulting package

Built on 2023-01-19T21:41 (took 7m52s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots r-cran-selectr

Lintian Result

Diff

diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
new file mode 100644
index 0000000..de0175c
--- /dev/null
+++ b/.devcontainer/Dockerfile
@@ -0,0 +1,73 @@
+# [Choice] R version: 4, 4.2, 4.1, 4.0
+ARG VARIANT=4.2
+# [Choice] Base image. Minimal (r-ver), tidyverse installed (tidyverse), or full image (binder): rocker/r-ver, rocker/tidyverse, rocker/binder
+ARG BASE_IMAGE=rocker/r-ver
+FROM ${BASE_IMAGE}:${VARIANT}
+
+# [Option] Install zsh
+ARG INSTALL_ZSH="true"
+# [Option] Upgrade OS packages to their latest versions
+ARG UPGRADE_PACKAGES="false"
+
+# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
+ARG USERNAME=rstudio
+ARG USER_UID=1000
+ARG USER_GID=$USER_UID
+USER root
+COPY library-scripts/*.sh /tmp/library-scripts/
+RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
+    && /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \
+    && usermod -a -G staff ${USERNAME} \
+    && apt-get -y install \
+        python3-pip \
+        libgit2-dev \
+        libcurl4-openssl-dev \
+        libssl-dev \
+        libxml2-dev \
+        libxt-dev \
+        libfontconfig1-dev \
+        libcairo2-dev \
+    && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts \
+    && python3 -m pip --no-cache-dir install radian \
+    && install2.r --error --skipinstalled --ncpus -1 \
+        devtools \
+        languageserver \
+        httpgd \
+    && rm -rf /tmp/downloaded_packages
+
+# VSCode R Debugger dependency. Install the latest release version from GitHub without using GitHub API.
+# See https://github.com/microsoft/vscode-dev-containers/issues/1032
+RUN export TAG=$(git ls-remote --tags --refs --sort='version:refname' https://github.com/ManuelHentschel/vscDebugger v\* | tail -n 1 | cut --delimiter='/' --fields=3) \
+    && Rscript -e "remotes::install_git('https://github.com/ManuelHentschel/vscDebugger.git', ref = '"${TAG}"', dependencies = FALSE)"
+
+# R Session watcher settings.
+# See more details: https://github.com/REditorSupport/vscode-R/wiki/R-Session-watcher
+RUN echo 'if (interactive() && Sys.getenv("TERM_PROGRAM") == "vscode") source(file.path(Sys.getenv("HOME"), ".vscode-R", "init.R"))' >>"${R_HOME}/etc/Rprofile.site"
+
+# [Option] Enable vscode-jupyter support
+ARG ENABLE_JUPYTER="false"
+RUN if [ "${ENABLE_JUPYTER}" = "true" ]; then \
+        if [ -z "$(dpkg --get-selections | grep libzmq3-dev)" ]; then \
+            apt-get update \
+            && export DEBIAN_FRONTEND=noninteractive \
+            && apt-get -y install --no-install-recommends libzmq3-dev \
+            && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*; \
+        fi \
+        && install2.r --error --skipinstalled --ncpus -1 IRkernel \
+        && rm -rf /tmp/downloaded_packages \
+        && python3 -m pip --no-cache-dir install jupyter \
+        && R --vanilla -s -e 'IRkernel::installspec(user = FALSE)'; \
+    fi
+
+# [Optional] Uncomment this section to install additional OS packages.
+# RUN apt-get update \
+#     && export DEBIAN_FRONTEND=noninteractive \
+#     && apt-get -y install --no-install-recommends <your-package-list-here>
+
+# [Optional] Uncomment this section to install additional R packages.
+RUN install2.r --error --skipinstalled --ncpus -1 \
+    stringr \
+    R6 \
+    testthat \
+    XML \
+    xml2 \
\ No newline at end of file
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
new file mode 100644
index 0000000..8823cbf
--- /dev/null
+++ b/.devcontainer/devcontainer.json
@@ -0,0 +1,39 @@
+{
+	"name": "R (Community)",
+	"build": {
+		"dockerfile": "Dockerfile",
+		// Update VARIANT to pick a specific R version: 4, 4.1, 4.0
+		"args": { "VARIANT": "4" }
+	},
+
+	// Configure tool-specific properties.
+	"customizations": {
+		// Configure properties specific to VS Code.
+		"vscode": {
+			// Set *default* container specific settings.json values on container create.
+			"settings": { 
+				"r.rterm.linux": "/usr/local/bin/radian",
+				"r.bracketedPaste": true,
+				"r.plot.useHttpgd": true,
+				"[r]": {
+					"editor.wordSeparators": "`~!@#%$^&*()-=+[{]}\\|;:'\",<>/?"
+				}
+			},
+			
+			// Add the IDs of extensions you want installed when the container is created.
+			"extensions": [
+				"reditorsupport.r",
+				"rdebugger.r-debugger"
+			]
+		}
+	},
+
+	// Use 'forwardPorts' to make a list of ports inside the container available locally.
+	// "forwardPorts": [],
+
+	// Use 'postCreateCommand' to run commands after the container is created.
+	// "postCreateCommand": "R --version",
+
+	// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
+	"remoteUser": "rstudio"
+}
\ No newline at end of file
diff --git a/.devcontainer/library-scripts/common-debian.sh b/.devcontainer/library-scripts/common-debian.sh
new file mode 100644
index 0000000..bf1f9e2
--- /dev/null
+++ b/.devcontainer/library-scripts/common-debian.sh
@@ -0,0 +1,454 @@
+#!/usr/bin/env bash
+#-------------------------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
+#-------------------------------------------------------------------------------------------------------------
+#
+# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/common.md
+# Maintainer: The VS Code and Codespaces Teams
+#
+# Syntax: ./common-debian.sh [install zsh flag] [username] [user UID] [user GID] [upgrade packages flag] [install Oh My Zsh! flag] [Add non-free packages]
+
+set -e
+
+INSTALL_ZSH=${1:-"true"}
+USERNAME=${2:-"automatic"}
+USER_UID=${3:-"automatic"}
+USER_GID=${4:-"automatic"}
+UPGRADE_PACKAGES=${5:-"true"}
+INSTALL_OH_MYS=${6:-"true"}
+ADD_NON_FREE_PACKAGES=${7:-"false"}
+SCRIPT_DIR="$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)"
+MARKER_FILE="/usr/local/etc/vscode-dev-containers/common"
+
+if [ "$(id -u)" -ne 0 ]; then
+    echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.'
+    exit 1
+fi
+
+# Ensure that login shells get the correct path if the user updated the PATH using ENV.
+rm -f /etc/profile.d/00-restore-env.sh
+echo "export PATH=${PATH//$(sh -lc 'echo $PATH')/\$PATH}" > /etc/profile.d/00-restore-env.sh
+chmod +x /etc/profile.d/00-restore-env.sh
+
+# If in automatic mode, determine if a user already exists, if not use vscode
+if [ "${USERNAME}" = "auto" ] || [ "${USERNAME}" = "automatic" ]; then
+    USERNAME=""
+    POSSIBLE_USERS=("vscode" "node" "codespace" "$(awk -v val=1000 -F ":" '$3==val{print $1}' /etc/passwd)")
+    for CURRENT_USER in ${POSSIBLE_USERS[@]}; do
+        if id -u ${CURRENT_USER} > /dev/null 2>&1; then
+            USERNAME=${CURRENT_USER}
+            break
+        fi
+    done
+    if [ "${USERNAME}" = "" ]; then
+        USERNAME=vscode
+    fi
+elif [ "${USERNAME}" = "none" ]; then
+    USERNAME=root
+    USER_UID=0
+    USER_GID=0
+fi
+
+# Load markers to see which steps have already run
+if [ -f "${MARKER_FILE}" ]; then
+    echo "Marker file found:"
+    cat "${MARKER_FILE}"
+    source "${MARKER_FILE}"
+fi
+
+# Ensure apt is in non-interactive to avoid prompts
+export DEBIAN_FRONTEND=noninteractive
+
+# Function to call apt-get if needed
+apt_get_update_if_needed()
+{
+    if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then
+        echo "Running apt-get update..."
+        apt-get update
+    else
+        echo "Skipping apt-get update."
+    fi
+}
+
+# Run install apt-utils to avoid debconf warning then verify presence of other common developer tools and dependencies
+if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
+
+    package_list="apt-utils \
+        openssh-client \
+        gnupg2 \
+        dirmngr \
+        iproute2 \
+        procps \
+        lsof \
+        htop \
+        net-tools \
+        psmisc \
+        curl \
+        wget \
+        rsync \
+        ca-certificates \
+        unzip \
+        zip \
+        nano \
+        vim-tiny \
+        less \
+        jq \
+        lsb-release \
+        apt-transport-https \
+        dialog \
+        libc6 \
+        libgcc1 \
+        libkrb5-3 \
+        libgssapi-krb5-2 \
+        libicu[0-9][0-9] \
+        liblttng-ust[0-9] \
+        libstdc++6 \
+        zlib1g \
+        locales \
+        sudo \
+        ncdu \
+        man-db \
+        strace \
+        manpages \
+        manpages-dev \
+        init-system-helpers"
+        
+    # Needed for adding manpages-posix and manpages-posix-dev which are non-free packages in Debian
+    if [ "${ADD_NON_FREE_PACKAGES}" = "true" ]; then
+        # Bring in variables from /etc/os-release like VERSION_CODENAME
+        . /etc/os-release
+        sed -i -E "s/deb http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME} main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME} main contrib non-free/" /etc/apt/sources.list
+        sed -i -E "s/deb-src http:\/\/(deb|httredir)\.debian\.org\/debian ${VERSION_CODENAME} main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME} main contrib non-free/" /etc/apt/sources.list
+        sed -i -E "s/deb http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME}-updates main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME}-updates main contrib non-free/" /etc/apt/sources.list
+        sed -i -E "s/deb-src http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME}-updates main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME}-updates main contrib non-free/" /etc/apt/sources.list
+        sed -i "s/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main contrib non-free/" /etc/apt/sources.list
+        sed -i "s/deb-src http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main contrib non-free/" /etc/apt/sources.list
+        sed -i "s/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main contrib non-free/" /etc/apt/sources.list 
+        sed -i "s/deb-src http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main contrib non-free/" /etc/apt/sources.list
+        # Handle bullseye location for security https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html
+        sed -i "s/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main contrib non-free/" /etc/apt/sources.list
+        sed -i "s/deb-src http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main contrib non-free/" /etc/apt/sources.list
+        echo "Running apt-get update..."
+        apt-get update
+        package_list="${package_list} manpages-posix manpages-posix-dev"
+    else
+        apt_get_update_if_needed
+    fi
+
+    # Install libssl1.1 if available
+    if [[ ! -z $(apt-cache --names-only search ^libssl1.1$) ]]; then
+        package_list="${package_list}       libssl1.1"
+    fi
+    
+    # Install appropriate version of libssl1.0.x if available
+    libssl_package=$(dpkg-query -f '${db:Status-Abbrev}\t${binary:Package}\n' -W 'libssl1\.0\.?' 2>&1 || echo '')
+    if [ "$(echo "$LIlibssl_packageBSSL" | grep -o 'libssl1\.0\.[0-9]:' | uniq | sort | wc -l)" -eq 0 ]; then
+        if [[ ! -z $(apt-cache --names-only search ^libssl1.0.2$) ]]; then
+            # Debian 9
+            package_list="${package_list}       libssl1.0.2"
+        elif [[ ! -z $(apt-cache --names-only search ^libssl1.0.0$) ]]; then
+            # Ubuntu 18.04, 16.04, earlier
+            package_list="${package_list}       libssl1.0.0"
+        fi
+    fi
+
+    echo "Packages to verify are installed: ${package_list}"
+    apt-get -y install --no-install-recommends ${package_list} 2> >( grep -v 'debconf: delaying package configuration, since apt-utils is not installed' >&2 )
+        
+    # Install git if not already installed (may be more recent than distro version)
+    if ! type git > /dev/null 2>&1; then
+        apt-get -y install --no-install-recommends git
+    fi
+
+    PACKAGES_ALREADY_INSTALLED="true"
+fi
+
+# Get to latest versions of all packages
+if [ "${UPGRADE_PACKAGES}" = "true" ]; then
+    apt_get_update_if_needed
+    apt-get -y upgrade --no-install-recommends
+    apt-get autoremove -y
+fi
+
+# Ensure at least the en_US.UTF-8 UTF-8 locale is available.
+# Common need for both applications and things like the agnoster ZSH theme.
+if [ "${LOCALE_ALREADY_SET}" != "true" ] && ! grep -o -E '^\s*en_US.UTF-8\s+UTF-8' /etc/locale.gen > /dev/null; then
+    echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen 
+    locale-gen
+    LOCALE_ALREADY_SET="true"
+fi
+
+# Create or update a non-root user to match UID/GID.
+group_name="${USERNAME}"
+if id -u ${USERNAME} > /dev/null 2>&1; then
+    # User exists, update if needed
+    if [ "${USER_GID}" != "automatic" ] && [ "$USER_GID" != "$(id -g $USERNAME)" ]; then 
+        group_name="$(id -gn $USERNAME)"
+        groupmod --gid $USER_GID ${group_name}
+        usermod --gid $USER_GID $USERNAME
+    fi
+    if [ "${USER_UID}" != "automatic" ] && [ "$USER_UID" != "$(id -u $USERNAME)" ]; then 
+        usermod --uid $USER_UID $USERNAME
+    fi
+else
+    # Create user
+    if [ "${USER_GID}" = "automatic" ]; then
+        groupadd $USERNAME
+    else
+        groupadd --gid $USER_GID $USERNAME
+    fi
+    if [ "${USER_UID}" = "automatic" ]; then 
+        useradd -s /bin/bash --gid $USERNAME -m $USERNAME
+    else
+        useradd -s /bin/bash --uid $USER_UID --gid $USERNAME -m $USERNAME
+    fi
+fi
+
+# Add sudo support for non-root user
+if [ "${USERNAME}" != "root" ] && [ "${EXISTING_NON_ROOT_USER}" != "${USERNAME}" ]; then
+    echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME
+    chmod 0440 /etc/sudoers.d/$USERNAME
+    EXISTING_NON_ROOT_USER="${USERNAME}"
+fi
+
+# ** Shell customization section **
+if [ "${USERNAME}" = "root" ]; then 
+    user_rc_path="/root"
+else
+    user_rc_path="/home/${USERNAME}"
+fi
+
+# Restore user .bashrc defaults from skeleton file if it doesn't exist or is empty
+if [ ! -f "${user_rc_path}/.bashrc" ] || [ ! -s "${user_rc_path}/.bashrc" ] ; then
+    cp  /etc/skel/.bashrc "${user_rc_path}/.bashrc"
+fi
+
+# Restore user .profile defaults from skeleton file if it doesn't exist or is empty
+if  [ ! -f "${user_rc_path}/.profile" ] || [ ! -s "${user_rc_path}/.profile" ] ; then
+    cp  /etc/skel/.profile "${user_rc_path}/.profile"
+fi
+
+# .bashrc/.zshrc snippet
+rc_snippet="$(cat << 'EOF'
+
+if [ -z "${USER}" ]; then export USER=$(whoami); fi
+if [[ "${PATH}" != *"$HOME/.local/bin"* ]]; then export PATH="${PATH}:$HOME/.local/bin"; fi
+
+# Display optional first run image specific notice if configured and terminal is interactive
+if [ -t 1 ] && [[ "${TERM_PROGRAM}" = "vscode" || "${TERM_PROGRAM}" = "codespaces" ]] && [ ! -f "$HOME/.config/vscode-dev-containers/first-run-notice-already-displayed" ]; then
+    if [ -f "/usr/local/etc/vscode-dev-containers/first-run-notice.txt" ]; then
+        cat "/usr/local/etc/vscode-dev-containers/first-run-notice.txt"
+    elif [ -f "/workspaces/.codespaces/shared/first-run-notice.txt" ]; then
+        cat "/workspaces/.codespaces/shared/first-run-notice.txt"
+    fi
+    mkdir -p "$HOME/.config/vscode-dev-containers"
+    # Mark first run notice as displayed after 10s to avoid problems with fast terminal refreshes hiding it
+    ((sleep 10s; touch "$HOME/.config/vscode-dev-containers/first-run-notice-already-displayed") &)
+fi
+
+# Set the default git editor if not already set
+if [ -z "$(git config --get core.editor)" ] && [ -z "${GIT_EDITOR}" ]; then
+    if  [ "${TERM_PROGRAM}" = "vscode" ]; then
+        if [[ -n $(command -v code-insiders) &&  -z $(command -v code) ]]; then 
+            export GIT_EDITOR="code-insiders --wait"
+        else 
+            export GIT_EDITOR="code --wait"
+        fi
+    fi
+fi
+
+EOF
+)"
+
+# code shim, it fallbacks to code-insiders if code is not available
+cat << 'EOF' > /usr/local/bin/code
+#!/bin/sh
+
+get_in_path_except_current() {
+    which -a "$1" | grep -A1 "$0" | grep -v "$0"
+}
+
+code="$(get_in_path_except_current code)"
+
+if [ -n "$code" ]; then
+    exec "$code" "$@"
+elif [ "$(command -v code-insiders)" ]; then
+    exec code-insiders "$@"
+else
+    echo "code or code-insiders is not installed" >&2
+    exit 127
+fi
+EOF
+chmod +x /usr/local/bin/code
+
+# systemctl shim - tells people to use 'service' if systemd is not running
+cat << 'EOF' > /usr/local/bin/systemctl
+#!/bin/sh
+set -e
+if [ -d "/run/systemd/system" ]; then
+    exec /bin/systemctl "$@"
+else
+    echo '\n"systemd" is not running in this container due to its overhead.\nUse the "service" command to start services instead. e.g.: \n\nservice --status-all'
+fi
+EOF
+chmod +x /usr/local/bin/systemctl
+
+# Codespaces bash and OMZ themes - partly inspired by https://github.com/ohmyzsh/ohmyzsh/blob/master/themes/robbyrussell.zsh-theme
+codespaces_bash="$(cat \
+<<'EOF'
+
+# Codespaces bash prompt theme
+__bash_prompt() {
+    local userpart='`export XIT=$? \
+        && [ ! -z "${GITHUB_USER}" ] && echo -n "\[\033[0;32m\]@${GITHUB_USER} " || echo -n "\[\033[0;32m\]\u " \
+        && [ "$XIT" -ne "0" ] && echo -n "\[\033[1;31m\]➜" || echo -n "\[\033[0m\]➜"`'
+    local gitbranch='`\
+        if [ "$(git config --get codespaces-theme.hide-status 2>/dev/null)" != 1 ]; then \
+            export BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD 2>/dev/null); \
+            if [ "${BRANCH}" != "" ]; then \
+                echo -n "\[\033[0;36m\](\[\033[1;31m\]${BRANCH}" \
+                && if git ls-files --error-unmatch -m --directory --no-empty-directory -o --exclude-standard ":/*" > /dev/null 2>&1; then \
+                        echo -n " \[\033[1;33m\]✗"; \
+                fi \
+                && echo -n "\[\033[0;36m\]) "; \
+            fi; \
+        fi`'
+    local lightblue='\[\033[1;34m\]'
+    local removecolor='\[\033[0m\]'
+    PS1="${userpart} ${lightblue}\w ${gitbranch}${removecolor}\$ "
+    unset -f __bash_prompt
+}
+__bash_prompt
+
+EOF
+)"
+
+codespaces_zsh="$(cat \
+<<'EOF'
+# Codespaces zsh prompt theme
+__zsh_prompt() {
+    local prompt_username
+    if [ ! -z "${GITHUB_USER}" ]; then 
+        prompt_username="@${GITHUB_USER}"
+    else
+        prompt_username="%n"
+    fi
+    PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow
+    PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd
+    PROMPT+='$([ "$(git config --get codespaces-theme.hide-status 2>/dev/null)" != 1 ] && git_prompt_info)' # Git status
+    PROMPT+='%{$fg[white]%}$ %{$reset_color%}'
+    unset -f __zsh_prompt
+}
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[cyan]%}(%{$fg_bold[red]%}"
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[yellow]%}✗%{$fg_bold[cyan]%})"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[cyan]%})"
+__zsh_prompt
+
+EOF
+)"
+
+# Add RC snippet and custom bash prompt
+if [ "${RC_SNIPPET_ALREADY_ADDED}" != "true" ]; then
+    echo "${rc_snippet}" >> /etc/bash.bashrc
+    echo "${codespaces_bash}" >> "${user_rc_path}/.bashrc"
+    echo 'export PROMPT_DIRTRIM=4' >> "${user_rc_path}/.bashrc"
+    if [ "${USERNAME}" != "root" ]; then
+        echo "${codespaces_bash}" >> "/root/.bashrc"
+        echo 'export PROMPT_DIRTRIM=4' >> "/root/.bashrc"
+    fi
+    chown ${USERNAME}:${group_name} "${user_rc_path}/.bashrc"
+    RC_SNIPPET_ALREADY_ADDED="true"
+fi
+
+# Optionally install and configure zsh and Oh My Zsh!
+if [ "${INSTALL_ZSH}" = "true" ]; then
+    if ! type zsh > /dev/null 2>&1; then
+        apt_get_update_if_needed
+        apt-get install -y zsh
+    fi
+    if [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then
+        echo "${rc_snippet}" >> /etc/zsh/zshrc
+        ZSH_ALREADY_INSTALLED="true"
+    fi
+
+    # Adapted, simplified inline Oh My Zsh! install steps that adds, defaults to a codespaces theme.
+    # See https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh for official script.
+    oh_my_install_dir="${user_rc_path}/.oh-my-zsh"
+    if [ ! -d "${oh_my_install_dir}" ] && [ "${INSTALL_OH_MYS}" = "true" ]; then
+        template_path="${oh_my_install_dir}/templates/zshrc.zsh-template"
+        user_rc_file="${user_rc_path}/.zshrc"
+        umask g-w,o-w
+        mkdir -p ${oh_my_install_dir}
+        git clone --depth=1 \
+            -c core.eol=lf \
+            -c core.autocrlf=false \
+            -c fsck.zeroPaddedFilemode=ignore \
+            -c fetch.fsck.zeroPaddedFilemode=ignore \
+            -c receive.fsck.zeroPaddedFilemode=ignore \
+            "https://github.com/ohmyzsh/ohmyzsh" "${oh_my_install_dir}" 2>&1
+        echo -e "$(cat "${template_path}")\nDISABLE_AUTO_UPDATE=true\nDISABLE_UPDATE_PROMPT=true" > ${user_rc_file}
+        sed -i -e 's/ZSH_THEME=.*/ZSH_THEME="codespaces"/g' ${user_rc_file}
+
+        mkdir -p ${oh_my_install_dir}/custom/themes
+        echo "${codespaces_zsh}" > "${oh_my_install_dir}/custom/themes/codespaces.zsh-theme"
+        # Shrink git while still enabling updates
+        cd "${oh_my_install_dir}"
+        git repack -a -d -f --depth=1 --window=1
+        # Copy to non-root user if one is specified
+        if [ "${USERNAME}" != "root" ]; then
+            cp -rf "${user_rc_file}" "${oh_my_install_dir}" /root
+            chown -R ${USERNAME}:${group_name} "${user_rc_path}"
+        fi
+    fi
+fi
+
+# Persist image metadata info, script if meta.env found in same directory
+meta_info_script="$(cat << 'EOF'
+#!/bin/sh
+. /usr/local/etc/vscode-dev-containers/meta.env
+
+# Minimal output
+if [ "$1" = "version" ] || [ "$1" = "image-version" ]; then
+    echo "${VERSION}"
+    exit 0
+elif [ "$1" = "release" ]; then
+    echo "${GIT_REPOSITORY_RELEASE}"
+    exit 0
+elif [ "$1" = "content" ] || [ "$1" = "content-url" ] || [ "$1" = "contents" ] || [ "$1" = "contents-url" ]; then
+    echo "${CONTENTS_URL}"
+    exit 0
+fi
+
+#Full output
+echo
+echo "Development container image information"
+echo
+if [ ! -z "${VERSION}" ]; then echo "- Image version: ${VERSION}"; fi
+if [ ! -z "${DEFINITION_ID}" ]; then echo "- Definition ID: ${DEFINITION_ID}"; fi
+if [ ! -z "${VARIANT}" ]; then echo "- Variant: ${VARIANT}"; fi
+if [ ! -z "${GIT_REPOSITORY}" ]; then echo "- Source code repository: ${GIT_REPOSITORY}"; fi
+if [ ! -z "${GIT_REPOSITORY_RELEASE}" ]; then echo "- Source code release/branch: ${GIT_REPOSITORY_RELEASE}"; fi
+if [ ! -z "${BUILD_TIMESTAMP}" ]; then echo "- Timestamp: ${BUILD_TIMESTAMP}"; fi
+if [ ! -z "${CONTENTS_URL}" ]; then echo && echo "More info: ${CONTENTS_URL}"; fi
+echo
+EOF
+)"
+if [ -f "${SCRIPT_DIR}/meta.env" ]; then
+    mkdir -p /usr/local/etc/vscode-dev-containers/
+    cp -f "${SCRIPT_DIR}/meta.env" /usr/local/etc/vscode-dev-containers/meta.env
+    echo "${meta_info_script}" > /usr/local/bin/devcontainer-info
+    chmod +x /usr/local/bin/devcontainer-info
+fi
+
+# Write marker file
+mkdir -p "$(dirname "${MARKER_FILE}")"
+echo -e "\
+    PACKAGES_ALREADY_INSTALLED=${PACKAGES_ALREADY_INSTALLED}\n\
+    LOCALE_ALREADY_SET=${LOCALE_ALREADY_SET}\n\
+    EXISTING_NON_ROOT_USER=${EXISTING_NON_ROOT_USER}\n\
+    RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\
+    ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}"
+
+echo "Done!"
\ No newline at end of file
diff --git a/DESCRIPTION b/DESCRIPTION
index 9baca7f..7655c14 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -21,10 +21,8 @@ Description: Translates a CSS3 selector into an equivalent XPath
   XML nodes. This package is a port of the Python package 'cssselect'
   (<https://cssselect.readthedocs.io/>).
 NeedsCompilation: no
-Packaged: 2019-11-20 06:04:49 UTC; simon
+Packaged: 2023-01-19 21:38:28 UTC; root
 Author: Simon Potter [aut, trl, cre],
   Simon Sapin [aut],
   Ian Bicking [aut]
 Maintainer: Simon Potter <simon@sjp.co.nz>
-Repository: CRAN
-Date/Publication: 2019-11-20 07:30:03 UTC
diff --git a/LICENCE b/LICENCE
index 6493038..576ef14 100644
--- a/LICENCE
+++ b/LICENCE
@@ -1,3 +1,3 @@
-YEAR: 2016
+YEAR: 2022
 COPYRIGHT HOLDER: Simon Potter, Simon Sapin, Ian Bicking
 ORGANIZATION: None
diff --git a/MD5 b/MD5
deleted file mode 100644
index 9a211df..0000000
--- a/MD5
+++ /dev/null
@@ -1,34 +0,0 @@
-3d5166f1519fcf1bb78f8abfe840ddb4 *DESCRIPTION
-646335899194db48bb8acae0c1258fc1 *LICENCE
-588316dbbab29cb72b92a140e5acff21 *NAMESPACE
-530048c59d463df62909d02f460f15ba *R/main.R
-656268ff4ca9283070440d7d5e0b56db *R/parser.R
-3e50d109e1a9859c41ca8773f78bf1aa *R/xpath.R
-42f25a40ae94ea8ddea91cb3a8333983 *R/zzz.R
-16dddf141fd0e2911eb7a6f0f91f710c *README.md
-bc6e9cd100db4e2b9388994b719977fc *inst/CITATION
-ef261464fc2a4c7bab9604dea48c8021 *inst/NEWS.Rd
-944df9b3445e090bb4ffa83c7312a87c *inst/demos/svg-mathml.svg
-19ebf0e65c6c8d756c284f8d1807c91b *man/css_to_xpath.Rd
-f6661fb8e3b51efb312fe6ae2bef3c4b *man/querySelectorAll.Rd
-b697c111a02fec0b26c003fed8a53a96 *tests/test-all.R
-744c91f65e84eb9243244e397ef0cdb9 *tests/testthat/test-main.R
-61e88742c97f32be914ec66a7f0d06f9 *tests/testthat/test-method-registration.R
-afface3cfd6f383349701dae49fe5661 *tests/testthat/test-parse-errors.R
-75ccb5019c4c86ce3b1bdb5b6c3898c1 *tests/testthat/test-parser.R
-45784125a13c50569c9985f5597073fa *tests/testthat/test-pseudo.R
-ba92467dee6ada588bb5f4d66c1b4faf *tests/testthat/test-querySelector-XML.R
-4881211793b19a06050d684215bbc744 *tests/testthat/test-querySelector-default.R
-54597b66fa36b3234d141af5da38783e *tests/testthat/test-querySelector-xml2.R
-853ff6dd1da9254a52cf4429e357c52d *tests/testthat/test-quoting.R
-309e7a0f28882357442e4183b2e728db *tests/testthat/test-select-XML.R
-b7cffd0cb240cc7c48039c73c0d7be49 *tests/testthat/test-select-xml2.R
-981dd6433044b2caab821d542e1fc086 *tests/testthat/test-series.R
-aa599ec5ca72bd3e6abdaa828d2ce407 *tests/testthat/test-shakespeare-XML.R
-796c1ee1735b9b8dcb95aa4ae65b5ac8 *tests/testthat/test-shakespeare-xml2.R
-63aa51a5c57bf7e55a29520ad2f24994 *tests/testthat/test-specificity.R
-c79b31bae1f7c65c9da99c4ba4e7679f *tests/testthat/test-tokenizer.R
-70d40574031356b38e9dfa41c0c213bd *tests/testthat/test-translation.R
-ee415c821c4d450c224c3e2fdac969ab *tests/testthat/test-xmllang-XML.R
-2e4413e58117a4864e7ce4f883c2f5fb *tests/testthat/test-xmllang-xml2.R
-18e6f493d2cecaebbe1204f1c7d910c6 *tests/testthat/test-xpath.R
diff --git a/R/parser.R b/R/parser.R
index a348cd4..6c9acfa 100644
--- a/R/parser.R
+++ b/R/parser.R
@@ -160,6 +160,39 @@ Negation <- R6Class("Negation",
     )
 )
 
+Matching <- R6Class("Matching",
+    public = list(
+        selector = NULL,
+        selector_list = NULL,
+        initialize = function(selector, selector_list) {
+            self$selector <- selector
+            self$selector_list <- selector_list
+        },
+        repr = function() {
+            paste0(
+                first_class_name(self),
+                "[",
+                self$selector$repr(),
+                ":is(",
+                paste0(
+                    sapply(self$selector_list, function(s) s$repr()),
+                    collapse = ", "
+                ),
+                ")]"
+            )
+        },
+        specificity = function() {
+            specs <- sapply(self$selector_list, function(s) s$specificity())
+            specs <- t(specs)
+            specs <- specs[order(-specs[, 1], -specs[, 2], -specs[, 3]), ]
+            specs[1, ]
+        },
+        show = function() { # nocov start
+            cat(self$repr(), "\n")
+        } # nocov end
+    )
+)
+
 Attrib <- R6Class("Attrib",
     public = list(
         selector = NULL,
@@ -306,16 +339,15 @@ CombinedSelector <- R6Class("CombinedSelector",
 #### Parser
 
 # foo
-el_re <- '^[ \t\r\n\f]*([a-zA-Z]+)[ \t\r\n\f]*$'
+el_re <- "^[ \t\r\n\f]*([a-zA-Z]+)[ \t\r\n\f]*$"
 
 # foo#bar or #bar
-id_re <- '^[ \t\r\n\f]*([a-zA-Z]*)#([a-zA-Z0-9_-]+)[ \t\r\n\f]*$'
+id_re <- "^[ \t\r\n\f]*([a-zA-Z]*)#([a-zA-Z0-9_-]+)[ \t\r\n\f]*$"
 
 # foo.bar or .bar
-class_re <- '^[ \t\r\n\f]*([a-zA-Z]*)\\.([a-zA-Z][a-zA-Z0-9_-]*)[ \t\r\n\f]*$'
+class_re <- "^[ \t\r\n\f]*([a-zA-Z]*)\\.([a-zA-Z][a-zA-Z0-9_-]*)[ \t\r\n\f]*$"
 
 parse <- function(css) {
-    nc <- nchar(css)
     el_match <- str_match(css, el_re)[1, 2]
     if (!is.na(el_match))
         return(list(Selector$new(Element$new(element = el_match))))
@@ -397,7 +429,7 @@ parse_selector <- function(stream) {
         } else {
             # By exclusion, the last parse_simple_selector() ended
             # at peek == ' '
-            combinator <- ' '
+            combinator <- " "
         }
         stuff <- parse_simple_selector(stream)
         pseudo_element <- stuff$pseudo_element
@@ -495,13 +527,16 @@ parse_simple_selector <- function(stream, inside_negation = FALSE) {
                     stop("Expected ')', got ", nt$value)
                 }
                 result <- Negation$new(result, argument)
+            } else if (any(tolower(ident) == c("matches", "is"))) {
+                selectors <- parse_simple_selector_arguments(stream)
+                result <- Matching$new(result, selectors)
             } else {
                 arguments <- list()
                 i <- 1
                 while (TRUE) {
                     nt <- stream$nxt()
                     if (nt$type %in% c("IDENT", "STRING", "NUMBER") ||
-                        (token_equality(nt ,"DELIM", "+") ||
+                        (token_equality(nt, "DELIM", "+") ||
                          token_equality(nt, "DELIM", "-"))) {
                         arguments[[i]] <- nt
                         i <- i + 1
@@ -528,6 +563,38 @@ parse_simple_selector <- function(stream, inside_negation = FALSE) {
     list(result = result, pseudo_element = pseudo_element)
 }
 
+parse_simple_selector_arguments <- function(stream) {
+    index <- 1
+    arguments <- list()
+
+    while (TRUE) {
+        results <- parse_simple_selector(stream, inside_negation = TRUE)
+        result <- results$result
+        pseudo_element <- results$pseudo_element
+
+        if (!is.null(pseudo_element)) {
+            stop("Got pseudo-element ::", pseudo_element, " inside function")
+        }
+
+        stream$skip_whitespace()
+        nt <- stream$nxt()
+
+        if (token_equality(nt, "EOF", NULL) || token_equality(nt, "DELIM", ",")) {
+            nt <- stream$nxt()
+            stream$skip_whitespace()
+            arguments[[index]] <- result
+            index <- index + 1
+        } else if (token_equality(nt, "DELIM", ")")) {
+            arguments[[index]] <- result
+            break
+        } else {
+            stop("Expected an argument, got ", nt$repr())
+        }
+    }
+
+    arguments
+}
+
 parse_attrib <- function(selector, stream) {
     stream$skip_whitespace()
     attrib <- stream$next_ident_or_star()
@@ -595,7 +662,7 @@ parse_series <- function(tokens) {
             return(c(0, result))
         }
     }
-    ab <- str_split_fixed(s, "n", 2)[1,]
+    ab <- str_split_fixed(s, "n", 2)[1, ]
     a <- str_trim(ab[1])
     b <- str_trim(ab[2])
 
@@ -658,20 +725,20 @@ compile_ <- function(pattern) {
     }
 }
 
-delims_2ch <- c('~=', '|=', '^=', '$=', '*=', '::', '!=')
-delims_1ch <- c('>', '+', '~', ',', '.', '*', '=', '[', ']', '(', ')', '|', ':', '#')
+delims_2ch <- c("~=", "|=", "^=", "$=", "*=", "::", "!=")
+delims_1ch <- c(">", "+", "~", ",", ".", "*", "=", "[", "]", "(", ")", "|", ":", "#")
 delim_escapes <- paste0("\\", delims_1ch, collapse = "|")
-match_whitespace <- compile_('[ \t\r\n\f]+')
-match_number <- compile_('[+-]?(?:[0-9]*\\.[0-9]+|[0-9]+)')
+match_whitespace <- compile_("[ \t\r\n\f]+")
+match_number <- compile_("[+-]?(?:[0-9]*\\.[0-9]+|[0-9]+)")
 match_hash <- compile_(paste0("^#([_a-zA-Z0-9-]|", nonascii, "|\\\\(?:", delim_escapes, "))+"))
 match_ident <- compile_(paste0("^([_a-zA-Z0-9-]|", nonascii, "|\\\\(?:", delim_escapes, "))+"))
 match_string_by_quote <- list("'" = compile_(paste0("([^\n\r\f\\']|", TokenMacros$string_escape, ")*")),
                               '"' = compile_(paste0('([^\n\r\f\\"]|', TokenMacros$string_escape, ")*")))
 
 # Substitution for escaped chars
-sub_simple_escape <- function(x) gsub('\\\\(.)', "\\1", x)
+sub_simple_escape <- function(x) gsub("\\\\(.)", "\\1", x)
 sub_unicode_escape <- function(x) gsub(TokenMacros$unicode_escape, "\\1", x, ignore.case = TRUE)
-sub_newline_escape <- function(x) gsub('\\\\(?:\n|\r\n|\r|\f)', "", x)
+sub_newline_escape <- function(x) gsub("\\\\(?:\n|\r\n|\r|\f)", "", x)
 
 tokenize <- function(s) {
     pos <- 1
diff --git a/R/xpath.R b/R/xpath.R
index 3359c73..001c6cb 100644
--- a/R/xpath.R
+++ b/R/xpath.R
@@ -22,10 +22,10 @@ XPathExpr <- R6Class("XPathExpr",
         repr = function() {
             paste0(first_class_name(self), "[", self$str(), "]")
         },
-        add_condition = function(condition) {
+        add_condition = function(condition, conjunction = "and") {
             self$condition <-
                 if (nzchar(self$condition))
-                    paste0(self$condition, " and (", condition, ")")
+                    paste0(self$condition, " ", conjunction, " (", condition, ")")
                 else
                     paste0("(", condition, ")")
         },
@@ -144,6 +144,8 @@ GenericTranslator <- R6Class("GenericTranslator",
                 self$xpath_combinedselector(parsed_selector)
             else if (method_name == "xpath_element")
                 self$xpath_element(parsed_selector)
+            else if (method_name == "xpath_matching")
+                self$xpath_matching(parsed_selector)
             else if (method_name == "xpath_function")
                 self$xpath_function(parsed_selector)
             else if (method_name == "xpath_hash")
@@ -193,6 +195,19 @@ GenericTranslator <- R6Class("GenericTranslator",
             }
             xpath
         },
+        xpath_matching = function(matching) {
+            xpath <- self$xpath(matching$selector)
+            exprs <- sapply(matching$selector_list, function(s) self$xpath(s))
+
+            for (e in exprs) {
+                e$add_name_test()
+                if (nzchar(e$condition)) {
+                    xpath$add_condition(e$condition, "or")
+                }
+            }
+
+            xpath
+        },
         xpath_function = function(fn) {
             method_name <- paste0(
                 "xpath_",
@@ -407,7 +422,7 @@ GenericTranslator <- R6Class("GenericTranslator",
             # for a == 1, nth-*(an+b) means n+b-1 siblings before/after,
             # and since n %in% {0, 1, 2, ...}, if b-1<=0,
             # there is always an "n" matching any number of siblings (maybe none)
-            if (a == 1 && b_min_1 <=0) {
+            if (a == 1 && b_min_1 <= 0) {
                 return(xpath)
             }
             # early-exit condition 2:
diff --git a/debian/changelog b/debian/changelog
index 6c147a5..286a658 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+r-cran-selectr (0.4-2+git20221113.1.f344d5c-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Thu, 19 Jan 2023 21:38:31 -0000
+
 r-cran-selectr (0.4-2-2) unstable; urgency=medium
 
   * Team upload.
diff --git a/tests/testthat/test-parse-errors.R b/tests/testthat/test-parse-errors.R
index fd17973..f707126 100644
--- a/tests/testthat/test-parse-errors.R
+++ b/tests/testthat/test-parse-errors.R
@@ -74,4 +74,9 @@ test_that("useful errors are returned", {
                 throws_error("Expected ')', got .*"))
     expect_that(get_error(":not(:not(a))"),
                 throws_error("Got nested :not()"))
+    expect_that(get_error(":is(:before)"),
+                throws_error("Got pseudo-element ::before inside function"))
+
+    expect_that(get_error(":is(a b)"),
+                throws_error("Expected an argument, got <IDENT 'b' at 7>"))
 })
diff --git a/tests/testthat/test-parser.R b/tests/testthat/test-parser.R
index c2eb67d..321b7a5 100644
--- a/tests/testthat/test-parser.R
+++ b/tests/testthat/test-parser.R
@@ -79,6 +79,10 @@ test_that("parser parses canonical test expressions", {
                 equals("Hash[Element[div]#foobar]"))
     expect_that(parse_many("div:not(div.foo)"),
                 equals("Negation[Element[div]:not(Class[Element[div].foo])]"))
+    expect_that(parse_many("div:is(.foo, #bar)"),
+                equals("Matching[Element[div]:is(Class[Element[*].foo], Hash[Element[*]#bar])]"))
+    expect_that(parse_many(":is(:hover, :visited)"),
+                equals("Matching[Element[*]:is(Pseudo[Element[*]:hover], Pseudo[Element[*]:visited])]"))
     expect_that(parse_many("td ~ th"),
                 equals("CombinedSelector[Element[td] ~ Element[th]]"))
 
diff --git a/tests/testthat/test-select-XML.R b/tests/testthat/test-select-XML.R
index 06629c3..4795a36 100644
--- a/tests/testthat/test-select-XML.R
+++ b/tests/testthat/test-select-XML.R
@@ -145,6 +145,11 @@ test_that("selection works correctly on a large barrage of tests", {
     expect_that(pcss(':not(*)'), equals(NULL))
     expect_that(pcss('a:not([href])'), equals('name-anchor'))
     expect_that(pcss('ol :Not(li[class])'), equals(c('first-li', 'second-li', 'li-div', 'fifth-li', 'sixth-li', 'seventh-li')))
+
+    expect_that(pcss(':is(#first-li, #second-li)'), equals(c('first-li', 'second-li')))
+    expect_that(pcss('a:is(#name-anchor, #tag-anchor)'), equals(c('name-anchor', 'tag-anchor')))
+    expect_that(pcss(':is(.c)'), equals(c('first-ol', 'third-li', 'fourth-li')))
+
     # Invalid characters in XPath element names, should not crash
     expect_that(pcss('di\ua0v', 'div\\['), equals(NULL))
     expect_that(pcss('[h\ua0ref]', '[h\\]ref]'), equals(NULL))
diff --git a/tests/testthat/test-select-xml2.R b/tests/testthat/test-select-xml2.R
index d543a85..f06c27d 100644
--- a/tests/testthat/test-select-xml2.R
+++ b/tests/testthat/test-select-xml2.R
@@ -145,6 +145,11 @@ test_that("selection works correctly on a large barrage of tests", {
     expect_that(pcss(':not(*)'), equals(NULL))
     expect_that(pcss('a:not([href])'), equals('name-anchor'))
     expect_that(pcss('ol :Not(li[class])'), equals(c('first-li', 'second-li', 'li-div', 'fifth-li', 'sixth-li', 'seventh-li')))
+
+    expect_that(pcss(':is(#first-li, #second-li)'), equals(c('first-li', 'second-li')))
+    expect_that(pcss('a:is(#name-anchor, #tag-anchor)'), equals(c('name-anchor', 'tag-anchor')))
+    expect_that(pcss(':is(.c)'), equals(c('first-ol', 'third-li', 'fourth-li')))
+
     # Invalid characters in XPath element names, should not crash
     expect_that(pcss('di\ua0v', 'div\\['), equals(NULL))
     expect_that(pcss('[h\ua0ref]', '[h\\]ref]'), equals(NULL))
diff --git a/tests/testthat/test-specificity.R b/tests/testthat/test-specificity.R
index 07cae5d..93994b2 100644
--- a/tests/testthat/test-specificity.R
+++ b/tests/testthat/test-specificity.R
@@ -27,6 +27,9 @@ test_that("parser creates correct specificity", {
     expect_that(spec(":not(:empty)"), equals(c(0, 1, 0)))
     expect_that(spec(":not(#foo)"), equals(c(1, 0, 0)))
 
+    expect_that(spec(":is(.foo, #bar)"), equals(c(1, 0, 0)))
+    expect_that(spec(":is(:hover, :visited)"), equals(c(0, 1, 0)))
+
     expect_that(spec("foo:empty"), equals(c(0, 1, 1)))
     expect_that(spec("foo:before"), equals(c(0, 0, 2)))
     expect_that(spec("foo::before"), equals(c(0, 0, 2)))
diff --git a/tests/testthat/test-translation.R b/tests/testthat/test-translation.R
index c3ab7a6..c82c2a3 100644
--- a/tests/testthat/test-translation.R
+++ b/tests/testthat/test-translation.R
@@ -108,7 +108,8 @@ test_that("translation from parsed objects to XPath works", {
 
     # Invalid characters in XPath element names
 
-    if (localeToCharset()[1] == "UTF-8") {
+    charsets <- localeToCharset()
+    if (!anyNA(charsets) && charsets[1] == "UTF-8") {
         expect_that(xpath('di\ua0v'),
                     equals("*[(name() = 'di v')]")) # div\ua0v
         expect_that(xpath('[h\ua0ref]'),

Debdiff

File lists identical (after any substitutions)

Control files: lines which differ (wdiff format)

  • Depends: r-base-core (>= 4.3.0-1~jan+lint2), 4.2.0-1~jan+unchanged1), r-api-4.0, r-cran-stringr, r-cran-r6

More details

Full run details