Nantes Université

Skip to content
Extraits de code Groupes Projets
test-2-add-inside-relationship-mapping 984 octets
Newer Older
ayushkumarshah's avatar
ayushkumarshah a validé
#!/bin/bash
# This should be run from the top level directory (lgeval/)
R's avatar
R a validé
echo "Running test for issue 2 (inside relationship mapping)..."

# NOTE: Assumes 'make' has been run, and lgeval conda env. built
# This provides necessary packages AND paths
source `conda info | grep 'base environment' | awk '{print $4}'`/etc/profile.d/conda.sh
conda activate lgeval
# Show environment (for checking and debugging)
echo "Environment Variables:"
R's avatar
R a validé
echo "  LgEvalDir    $LgEvalDir"
echo "  PYTHONPATH   $PYTHONPATH"
echo "  PATH         $PATH"
R's avatar
R a validé

TEST_FILES=`ls tests/sqrt_lg/*.lg` 
ayushkumarshah's avatar
ayushkumarshah a validé
for file in $TEST_FILES
do
  lg2mml $file
ayushkumarshah's avatar
ayushkumarshah a validé
  filename=`basename $file .lg`
  echo Input:"        "$file
  echo ">> MathML:    $filename.mml <<"
  echo ""
  cat $filename.mml
  echo ""
done

# Clean up MML files
# Delete ONLY the files that we created.
echo "Deleting .mml files..."
for file in $TEST_FILES
do
	rm `basename $file .lg`.mml
ayushkumarshah's avatar
ayushkumarshah a validé
done
# Deactivate lgeval environment
conda deactivate

echo "done."