Trouble getting code to register button.

Hi,
First time poster here, so I'll try to do my best at explaining my issue.
I am working on a project that involves controlling a stepper motor. I have been using the AccelStepper library for this project. My code below works as intended when the Main() function is running , but when I activate the LEFT_PIN and RIGHT_PIN switches simultaneously or the RIGHT_PIN switch on its own, I run into issues. The problem is that when either of those cases are true and Test() is running, the code skips the digitalRead(START_PIN) stipulation entirely and immediately goes into the IF statement that runs the motor. I have added Serial.print to the Test() function and verified that the START_PIN is working as intended, but the code does not seem to register it.

Here is my code:

#include <AccelStepper.h>

// Define the stepper and the pins it will use
AccelStepper stepper1(AccelStepper::DRIVER, 9, 8);

// Define our three input button pins
#define  LEFT_PIN  6
#define  RIGHT_PIN 5
#define  START_PIN 4

static float current_speed = 0.0;         // Holds current motor speed in steps/second

// Define our analog pot input pin
#define  SPEED_PIN A0

// Define our maximum and minimum speed in steps per second (scale pot to these)
#define  MAX_SPEED 6300
#define  MIN_SPEED 0

void setup() {
  // The only AccelStepper value we have to set here is the max speeed, which is higher than we'll ever go 
  stepper1.setMaxSpeed(10000.0);
  
  // Set up the three button inputs, with pullups
  pinMode(LEFT_PIN, INPUT_PULLUP);
  pinMode(RIGHT_PIN, INPUT_PULLUP);
  pinMode(START_PIN, INPUT_PULLUP);

  Serial.begin(9600);
}

void loop() {

  Test();

}

void Main(){

  static int analog_read_counter = 1000;    // Counts down to 0 to fire analog read
  static char sign = 0;                     // Holds -1, 1 or 0 to turn the motor on/off and control direction
  static int analog_value = 0;              // Holds raw analog value.
  
  // If a switch is pushed down (low), set the sign value appropriately
  if (analogRead(SPEED_PIN) >= 564) {
    sign = 1;
  }
  else if (analogRead(SPEED_PIN) <= 480) {    
    sign = -1;
  }
  else if (analogRead(SPEED_PIN) <= 500 && analogRead(SPEED_PIN) >= 524) {
    sign = 0;
  }
  
  // We only want to read the pot every so often (because it takes a long time we don't
  // want to do it every time through the main loop).  
  if (analog_read_counter > 0) {
    analog_read_counter--;
  }
  else {
    analog_read_counter = 1000;
    // Now read the pot (from 0 to 1023)
    analog_value = analogRead(SPEED_PIN);
    
    if (analogRead(SPEED_PIN) >= 564)
    {
    // Give the stepper a chance to step if it needs to
    stepper1.runSpeed();
    //  And scale the pot's value from min to max speeds
    current_speed = sign * (((analog_value/459.0 - 564.0/459.0) * (MAX_SPEED - MIN_SPEED)) + MIN_SPEED);
    Serial.print(analog_value); Serial.print("\t"); Serial.print(current_speed); Serial.println("\t");
    // Update the stepper to run at this new speed
    stepper1.setSpeed(current_speed);
    }

    else if (analogRead(SPEED_PIN) <= 480)
    {
    // Give the stepper a chance to step if it needs to
    stepper1.runSpeed();
    //  And scale the pot's value from min to max speeds
    current_speed = sign * (((-analog_value/480.0 + 1.0) * (MAX_SPEED - MIN_SPEED)) + MIN_SPEED);
    Serial.print(analog_value); Serial.print("\t"); Serial.print(current_speed); Serial.println("\t");
    // Update the stepper to run at this new speed
    stepper1.setSpeed(current_speed);
    }

    else
    {
    // Give the stepper a chance to step if it needs to
    stepper1.runSpeed();
    //  And scale the pot's value from min to max speeds
    current_speed = 0; //sign * (((analog_value/1023.0) * (MAX_SPEED - MIN_SPEED)) + MIN_SPEED);
    Serial.print(analog_value); Serial.print("\t"); Serial.print(current_speed); Serial.println("\t");
    // Update the stepper to run at this new speed
    stepper1.setSpeed(current_speed);
    }
  }

  

  // This will run the stepper at a constant speed
  stepper1.runSpeed();
}

void Test(){
  if (digitalRead(LEFT_PIN) == 1 && digitalRead(RIGHT_PIN) == 1)
  {
   if (digitalRead(START_PIN == 0))
    {
     tension();
    }
    else 
    {
     Test();
    }  
  }
  else if (digitalRead(LEFT_PIN) == 0)
  {
    if (digitalRead(START_PIN == 0))
    {
     compression(); 
    }
    else 
    {
     Test();
    } 
  }
  else
  {
    Main ();
  }
}


void tension (){
    stepper1.runSpeed();
    current_speed = 3000;
    stepper1.setSpeed(current_speed);
}

void compression(){      
    stepper1.runSpeed();
    current_speed = -3000;
    stepper1.setSpeed(current_speed);
}

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool but it's still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

Reverse_Giraffe:

   if (digitalRead(START_PIN == 0))

You misplaced a parenthesis in this statement. Since START_PIN != 0 this statement becomes the equivalent of:

if (digitalRead(false))

which is equivalent to:

if (digitalRead(0))

So you're unintentionally reading pin 0 instead of pin 4.

You also have the serious problem of calling Test() from inside Test(). Don't do that! With your current code you can just use return instead since that will return you to loop(), which will call Test() again on the next loop.

Okay, thanks for the advice on formatting, I'll try to implement that next time I post.

Also, I can't believe I didn't notice the parentheses issue, thanks for pointing that out. That seemed to solve the issue of it skipping the IF statement, but now the motor only runs while the button is pressed. I am unable to make it stay pressed due to the fact that it is a spring loaded button. Is there any bits of code you could recommend adding/changing to make it so the program will continue to run either the tension() or compression() functions continuously after the START_PIN is activated?

One way would be to have the start button toggle a Boolean value and use either true or false to run the other two routines.