Add def-use code sample and query

This commit is contained in:
Michael Hohn
2023-11-28 17:04:57 -08:00
committed by =Michael Hohn
parent 60ee4295b2
commit bf9197cb57
7 changed files with 189 additions and 1 deletions

36
cruft/snapshot-query-1 Executable file
View File

@@ -0,0 +1,36 @@
#!/bin/bash
usage="Take a snapshot of the current session1.ql
Usage:
$0 TheSnapShotName
"
if [ $# -ne 1 ]
then
echo "$usage"
exit 1
fi
if [ "$1" = "-h" ]
then
echo "$usage"
exit 1
fi
qname=$1
# create the tests
mkdir -p tests/$qname
touch tests/$qname/$qname.expected
echo $qname.ql > tests/$qname/$qname.qlref
git add tests/$qname/$qname.expected
git add tests/$qname/$qname.qlref
# snapshot the session
cp sample-utility-0.js tests/$qname/
git add tests/$qname/sample-utility-0.js
cp sample-utility-1.js tests/$qname/
git add tests/$qname/sample-utility-1.js
cp session/session1.ql solutions/$qname.ql
git add solutions/$qname.ql