You can easily test against any version of bash in a docker container.
You can start up a docker container running bash 3.2 like so:
$ docker run -it bash:3.2
You can mount a folder in the docker, so you can easily test scripts from your machine in the docker container. The following would allow the folder /Users/myuser to be available in the docker container at /myuser
$ docker run -v /Users/myuser/:/myuser -it bash:3.2
Note, you can use any bash version that's listed here:
and the source for these images can be found here:
https://github.com/tianon/docker-bash/