forked from Fluxora-Org/Fluxora-Contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix_calls.sh
More file actions
19 lines (15 loc) · 785 Bytes
/
Copy pathfix_calls.sh
File metadata and controls
19 lines (15 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# Find all create_stream calls with 7 arguments and add &0u32 as 8th
# Fix test.rs
echo "Fixing test.rs..."
sed -i 's/\.create_stream(\([^)]*\))/.create_stream(\1, \&0u32)/g' src/test.rs
sed -i 's/\.create_stream(\([^)]*\),)/.create_stream(\1, \&0u32,)/g' src/test.rs
# Fix integration_suite.rs
echo "Fixing integration_suite.rs..."
sed -i 's/\.create_stream(\([^)]*\))/.create_stream(\1, \&0u32)/g' tests/integration_suite.rs
sed -i 's/\.create_stream(\([^)]*\),)/.create_stream(\1, \&0u32,)/g' tests/integration_suite.rs
# Fix test_issue_39.rs
echo "Fixing test_issue_39.rs..."
sed -i 's/\.create_stream(\([^)]*\))/.create_stream(\1, \&0u32)/g' src/test_issue_39.rs
sed -i 's/\.create_stream(\([^)]*\),)/.create_stream(\1, \&0u32,)/g' src/test_issue_39.rs
echo "Done"