How do I use the MYSQL_TEST_LOGIN_FILE environment variable to change the mysql_config_editor file?
Evidently mysql_config_editor set spawns a shell subprocess, so to keep the environment variable available to it, you have to set it with export.  This works:
$ export MYSQL_TEST_LOGIN_FILE=~/.config/mylogin.cnf

$ echo $MYSQL_TEST_LOGIN_FILE
/home/username/.config/mylogin.cnf

$ mysql_config_editor set --login-path=mysqldump --host=localhost --user=root --password
Enter password: 

$ ls ~/.mylogin.cnf
ls: cannot access '/home/username/.mylogin.cnf': No such file or directory

$ ls ~/.config/mylogin.cnf
/home/username/.config/mylogin.cnf