## Copyright (C) 2021  Brodie Gaslam
##
## This file is part of "fansi - ANSI Control Sequence Aware String Functions"
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 2 or 3 of the License.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## Go to <https://www.r-project.org/Licenses> for copies of the licenses.

## remember that when reviewing these int_max will be reset to
## the original value

Converting tabs to spaces will cause string to be longer than allowed INT_MAX.

[1] "Converting tabs to spaces will cause string to be longer than allowed INT_MAX."

# we're trying to trigger the failover allocation mode for
# FANSI_size_buff, where double the requested size is over the max size

tce(strwrap2_ctl(string, 17, pad.end = " "))

Adding padding will create string longer than INT_MAX at index [1]. Try again with smaller strings.

[1] "Adding padding will create string longer than INT_MAX at index [1]. Try again with smaller strings."

strwrap_ctl(string, 16, prefix = "-----")

tce(strwrap_ctl(string, 16, prefix = "------"))

Adding prefix characters will create string longer than INT_MAX at index [1]. Try again with smaller strings.

[1] "Adding prefix characters will create string longer than INT_MAX at index [1]. Try again with smaller strings."

tce(strwrap_ctl(string, 16, indent = 6))

strwrap_ctl(string, 16, indent = 2, prefix = "---")

tce(strwrap_ctl(string, 16, indent = 3, prefix = "---"))

Strings longer than INT_MAX not supported (length 16 at index 1).

[1] "Strings longer than INT_MAX not supported (length 16 at index 1)."

Generating closing SGR will create string longer than INT_MAX at index [1]. Try again with smaller strings.

[1] "Generating closing SGR will create string longer than INT_MAX at index [1]. Try again with smaller strings."