Why do you think so? The A4988 is a chopper current driver. You cannot simply measure the voltage at the output pins with a voltmeter. The output switches with a high frequency between VMot and 0V.
Edit: And which board are you using? E.g. at a Nano you cannot use A6/A7 as OUTPUT.
I'd agree, I think you're trying to use A6 and A7 as digital pins and they are not (on many AVR Arduinos at least). They only connect to the ADC and nothing else. This is why they are not even pinned out on the Uno.
I will take a SWAG and suggest you swap A6 and A7 with any of the others A0 - A5 that are being used as analog inputs or use digital pins. Since you have a board I assume it is a finished project. Problems like this are why a prototype is built. A large chunk of your code is missing, I could not find comments explaining how it functions.