-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1669 from Unidata/gh1668.wif
Add test to #1668
- Loading branch information
Showing
5 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
# | ||
# Test to make sure ncdump works with a subdirectory which starts | ||
# with a unicode character. | ||
# See https://github.com/Unidata/netcdf-c/issues/1666 for more information. | ||
# Ward Fisher | ||
|
||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi | ||
. ../test_common.sh | ||
|
||
|
||
ERR() { | ||
RES=$? | ||
if [ $RES -ne 0 ]; then | ||
echo "Error found: $RES" | ||
exit $RES | ||
fi | ||
} | ||
|
||
UNISTRING=$(echo '\xe6\xb5\xb7') | ||
|
||
echo "" | ||
echo "Creating Unicode String Directory ${UNISTRING}" | ||
mkdir -p ${UNISTRING}; ERR | ||
|
||
echo "*** Generating binary file ${UNISTRING}/tst_utf.nc..." | ||
${NCGEN} -b -o "${UNISTRING}/tst_utf.nc" "${srcdir}/ref_tst_utf8.cdl"; ERR | ||
echo "*** Accessing binary file ${UNISTRING}/tst_utf.nc..." | ||
${NCDUMP} -h "${UNISTRING}/tst_utf.nc"; ERR | ||
|
||
echo "Test Passed. Cleaning up." | ||
rm "${UNISTRING}/tst_utf.nc"; ERR | ||
rmdir "${UNISTRING}"; ERR |